Opened 6 weeks ago

Closed 6 weeks ago

#35884 closed Uncategorized (duplicate)

Django doesn't support Pillow v11: ValueError('Invalid dimensions')

Reported by: jedie Owned by:
Component: File uploads/storage Version: 5.0
Severity: Normal Keywords: pillow, PIL, image, imagefield
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django's django.core.files.images.get_image_dimensions() feeds PIL with chunks to get the image size. Pillow v11 adds "raise ValueError" in v11 with https://github.com/python-pillow/Pillow/commit/e6e5ef5c5fbd83ac5dd63301e4d7d6860a7b2d09#diff-6ad43f85f1a075181d4d8cfcd97ae27bba1eccf5c3db5a3457160f98218eba6eR1404 that Django doesn't catch in the feed loop, here: https://github.com/django/django/blob/968397228fe03968bb855856532569586c8a8a1c/django/core/files/images.py#L35-L89

Change History (3)

comment:1 by jedie, 6 weeks ago

Has patch: set

comment:2 by Alexander Lazarević, 6 weeks ago

I think this is an duplicate of #33240

comment:3 by Sarah Boyce, 6 weeks ago

Resolution: duplicate
Status: newclosed

Thank you for raising an issue in Pillow jedie
I have commented there: https://github.com/python-pillow/Pillow/issues/8530#issuecomment-2456436638
Essentially, we are following the Pillow docs so I feel like this could be an issue in Pillow 11 and they should confirm before we make changes to Django

Agree this can be tracked by #33240

Note: See TracTickets for help on using tickets.
Back to Top