Fix GIF upload handling

main
Thomas Sileo 2022-09-14 08:38:54 +02:00
parent 4c86cd4be3
commit 110f7df962
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ async def save_upload(db_session: AsyncSession, f: UploadFile) -> models.Upload:
width = None width = None
height = None height = None
if f.content_type.startswith("image"): if f.content_type.startswith("image") and not f.content_type == "image/gif":
with Image.open(f.file) as _original_image: with Image.open(f.file) as _original_image:
# Fix image orientation (as we will remove the info from the EXIF # Fix image orientation (as we will remove the info from the EXIF
# metadata) # metadata)