Webp support

This commit is contained in:
Oliver Falk
2022-12-05 15:56:12 +00:00
parent ddfc1e7824
commit ba6f46c6eb
3 changed files with 46 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ def file_format(image_type):
return "png"
elif image_type == "GIF":
return "gif"
elif image_type == "WEBP":
return "webp"
return None
@@ -60,6 +62,8 @@ def pil_format(image_type):
return "PNG"
elif image_type == "gif":
return "GIF"
elif image_type == "webp":
return "WEBP"
logger.info("Unsupported file format: %s", image_type)
return None