Skip to content

Commit e389eab

Browse files
should close #22
1 parent 221b1ea commit e389eab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app.py

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def user_image_resize(user, size):
153153
image = Image.open(tmp)
154154
image.thumbnail((size, size), Image.ANTIALIAS)
155155
tmp = BytesIO()
156+
if image.mode in ("RGBA", "P"):
157+
image = image.convert("RGB")
156158
image.save(tmp, 'JPEG')
157159
tmp.seek(0)
158160

0 commit comments

Comments
 (0)