From 9a99c55eba07b0d796ba8614e15eadb40a793305 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Sep 2021 18:47:48 +0200 Subject: [PATCH] fsd --- files/helpers/images.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/helpers/images.py b/files/helpers/images.py index dcb06bfa8..db4681fa1 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -31,7 +31,7 @@ def upload_ibb(file=None, resize=False): om = next(frames) om.info = i.info om.save("image.webp", save_all=True, append_images=list(frames), loop=0) - else: + elif i.format.lower() != "webp": if i.format.lower() == "gif": gifwebp(input_image="image.webp", output_image="image.webp", option="-q 80") else: i.save("image.webp") @@ -50,7 +50,6 @@ class UploadException(Exception): pass - def upload_video(file): file_path = path.join("temp", secure_filename(file.filename))