Support WEBP format in image processing

Add support for WEBP file format in image processing.
This commit is contained in:
Valinor
2025-09-01 15:45:26 +02:00
committed by GitHub
parent a01f86a14e
commit 6973c65142

View File

@@ -77,6 +77,8 @@ def handle_image(request, image_object, filetype):
file_format = 'JPEG'
if filetype == '.png':
file_format = 'PNG'
if filetype == '.webp':
file_format = 'WEBP'
if (image_object.size / 1000) > 500: # if larger than 500 kb compress
if filetype == '.jpeg' or filetype == '.jpg':