Opened 15 hours ago
Last modified 14 hours ago
#35884 new Uncategorized
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
Note:
See TracTickets
for help on using tickets.
Patch is here: https://github.com/django/django/pull/18764