From 78ce35d77e046460e08fdf743a2317059d7444f6 Mon Sep 17 00:00:00 2001 From: Geoffrey Moss Date: Mon, 24 May 2021 22:32:08 -0400 Subject: [PATCH] Use auto_orient to rotate image thumbnails correctly --- gallery/file_modules/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery/file_modules/__init__.py b/gallery/file_modules/__init__.py index 39917ab..efe88db 100644 --- a/gallery/file_modules/__init__.py +++ b/gallery/file_modules/__init__.py @@ -39,6 +39,7 @@ def generate_thumbnail(self): self.thumbnail_uuid = hash_file(self.file_path) with Image(filename=self.file_path) as img: + img.auto_orient() with Image(width=img.width, height=img.height, background=Color("#EEEEEE")) as bg: bg.composite(img, 0, 0)