From e182ddc73823579e9647d6899cff2dc43c088a18 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 25 Oct 2022 22:19:16 +0200 Subject: [PATCH] fix orientation (thx sneks my love) --- files/helpers/media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index ab9509377..46ff5c10f 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -127,7 +127,7 @@ def process_image(filename=None, resize=0, trim=False, uploader=None, patron=Fal abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)") with Image.open(filename) as i: - params = ["convert", "-coalesce", filename, "-quality", "88", "-define", "webp:method=6", "-strip"] + params = ["convert", "-coalesce", filename, "-quality", "88", "-define", "webp:method=6", "-strip", "-auto-orient"] if trim and len(list(Iterator(i))) == 1: params.append("-trim") if resize and i.width > resize: