diff --git a/files/helpers/images.py b/files/helpers/images.py index fb6ed8c1a..1caa0969e 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -19,9 +19,9 @@ def process_image(filename=None, resize=False): om = next(frames) om.info = i.info - om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, lossless=True, quality=100, method=6) + om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, method=6, allow_mixed=True) elif i.format.lower() != "webp": - if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-q 100 -m 6 -metadata 'none' -mt") - else: i.save(filename, format="WEBP", lossless=True, quality=100, method=6) + if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-mixed -metadata none -f 100 -mt -m 6") + else: i.save(filename, format="WEBP", method=6) return f'/static{filename}' \ No newline at end of file