Skip to content

Commit

Permalink
should close #22
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansalamon authored Nov 18, 2024
1 parent 221b1ea commit e389eab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def user_image_resize(user, size):
image = Image.open(tmp)
image.thumbnail((size, size), Image.ANTIALIAS)
tmp = BytesIO()
if image.mode in ("RGBA", "P"):
image = image.convert("RGB")
image.save(tmp, 'JPEG')
tmp.seek(0)

Expand Down

0 comments on commit e389eab

Please sign in to comment.