lutris / website

Lutris.net website
https://lutris.net
GNU Affero General Public License v3.0
124 stars 110 forks source link

Can’t upload title banner #696

Closed Matombo closed 7 months ago

Matombo commented 8 months ago

Also postet on the forum because I didn't realize there is a website bugtracker: https://forums.lutris.net/t/cant-upload-title-banner-to-lutris-net/19967

Whenever I try to upload a title banner to lutris.net I get the error “This is not a valid image format” as soon as I click submit.

The file has the correct dimensions (184x69) and I tried jpg, png, and webp with no luck.

Matombo commented 8 months ago

looking in the code: https://github.com/lutris/website/blob/2959bf46ab925feaf8560db1ea7b50bf562e2b0c/games/forms.py#L104 maybe the server is running into this? https://stackoverflow.com/questions/76616042/attributeerror-module-pil-image-has-no-attribute-antialias#answer-76616129

D-Code commented 7 months ago

Having the same issue. Tried multiple different formats and dimensions (184x69 and larger), but getting the same error message.

(I believe any size is accepted by the form to begin with, because the form has a cropping and positioning function that will automatically scale it down to 184x69 once submitted successfully.)

strycore commented 7 months ago

looking in the code:

https://github.com/lutris/website/blob/2959bf46ab925feaf8560db1ea7b50bf562e2b0c/games/forms.py#L104

maybe the server is running into this? https://stackoverflow.com/questions/76616042/attributeerror-module-pil-image-has-no-attribute-antialias#answer-76616129

Yes this was the issue. I have updated Pillow recently and the ANTIALIAS attribute is gone.

I have updated the code and banner uploads are working again.