From a1ad5004f844b01e5cc3937e6cd0f952450fd9a3 Mon Sep 17 00:00:00 2001 From: Aaron Schmied <67342944+a10d@users.noreply.github.com> Date: Wed, 21 Sep 2022 12:13:26 +0200 Subject: [PATCH] [#585] respect the EXIF orientation tag when generating thumbs @see: https://github.com/disintegration/imaging#incorrect-image-orientation-after-processing-eg-an-image-appears-rotated-after-resizing --- tools/filesystem/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/filesystem/filesystem.go b/tools/filesystem/filesystem.go index 414235ea..f72e2b98 100644 --- a/tools/filesystem/filesystem.go +++ b/tools/filesystem/filesystem.go @@ -272,7 +272,7 @@ func (s *System) CreateThumb(originalKey string, thumbKey, thumbSize string) err defer r.Close() // create imaging object from the origial reader - img, decodeErr := imaging.Decode(r) + img, decodeErr := imaging.Decode(r, imaging.AutoOrientation(true)) if decodeErr != nil { return decodeErr }