From 70c4ea0d5484e9ffee16f1563d3ca268cde1bc94 Mon Sep 17 00:00:00 2001 From: Emre Date: Fri, 28 Aug 2026 12:16:52 -0400 Subject: [PATCH] fix(thumbnail): fixes thumbnail rotation issues Adding `imaging.AutoOrientation(true)` ensures that the image is decoded in the correct orientation based on the EXIF data without making assumptions. Manually verified the fix after the change and confirmed that it's working as expected Fixes #538 --- internal/image/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/image/image.go b/internal/image/image.go index ff2045ca..bd077fa7 100644 --- a/internal/image/image.go +++ b/internal/image/image.go @@ -68,7 +68,7 @@ func GetDimensions(r io.Reader) (int, int, error) { // CreateThumb generates a thumbnail of the given image file with the specified maximum dimension. // The thumbnail's width will be resized to `thumbPxSize` while maintaining the aspect ratio. func CreateThumb(thumbPxSize int, r io.Reader) (*bytes.Reader, error) { - img, err := imaging.Decode(r) + img, err := imaging.Decode(r, imaging.AutoOrientation(true)) if err != nil { return nil, err }