Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: invalid orientation of image thumbnail in Apple devices (#1891)

Athurg Gooth0af14fc81a05
diff --git a/server/resource.go b/server/resource.go
index 4c594d385..430aaee42 100644
--- a/server/resource.go
+++ b/server/resource.go
@@ -598,7 +598,7 @@ func getOrGenerateThumbnailImage(srcBlob []byte, dstPath string) ([]byte, error)
}()
reader := bytes.NewReader(srcBlob)
- src, err := imaging.Decode(reader)
+ src, err := imaging.Decode(reader, imaging.AutoOrientation(true))
if err != nil {
return nil, errors.Wrap(err, "failed to decode thumbnail image")
}