-
Notifications
You must be signed in to change notification settings - Fork 462
Description
Describe the bug
Backend is failing to create thumbnails for RGBA images
Steps to Reproduce
- Upload image with RGBA
Logs
File "/Users//projects/training_extensions/application/backend/app/api/routers/media.py", line 177, in get_media_thumbnail
thumbnail.save(buffer, format="JPEG")
│ │ └ <_io.BytesIO object at 0x32c8bd760>
│ └ <function Image.save at 0x11f2c2520>
└ <PIL.Image.Image image mode=RGBA size=64x64 at 0x32CA83110>
File "/Users//projects/training_extensions/application/backend/.venv/lib/python3.13/site-packages/PIL/Image.py", line 2590, in save
save_handler(self, fp, filename)
│ │ │ └ ''
│ │ └ <_io.BytesIO object at 0x32c8bd760>
│ └ <PIL.Image.Image image mode=RGBA size=64x64 at 0x32CA83110>
└ <function _save at 0x32c304d60>
File "/Users//projects/training_extensions/application/backend/.venv/lib/python3.13/site-packages/PIL/JpegImagePlugin.py", line 672, in _save
raise OSError(msg) from e
└ 'cannot write mode RGBA as JPEG'