We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84a5bbc commit 0b0fb88Copy full SHA for 0b0fb88
1 file changed
open_prices/proofs/utils.py
@@ -99,8 +99,8 @@ def generate_thumbnail(
99
image_thumb_full_path = generate_full_path(
100
current_dir, f"{file_stem}.{settings.THUMBNAIL_SIZE[0]}", extension
101
)
102
- # avoid 'cannot write mode RGBA as JPEG' error
103
- if mimetype in ("image/jpeg",) and img_thumb.mode in ("RGBA", "P"):
+ # avoid 'cannot write mode RGBA/LA/P as JPEG' error
+ if mimetype in ("image/jpeg",) and img_thumb.mode in ("RGBA", "LA", "P"):
104
img_thumb = img_thumb.convert("RGB")
105
# save (exif will be stripped)
106
img_thumb.save(image_thumb_full_path)
0 commit comments