Willow icon indicating copy to clipboard operation
Willow copied to clipboard

IOErrors Not Caught on Image Load for Pillow

Open lomaxap opened this issue 8 years ago • 1 comments

related to Wagtail issue.

If image is truncated or corrupted, Willow still attempts to process image.

lomaxap avatar Jan 24 '17 19:01 lomaxap

Hi All, this issue still exists. One of our marketing team members found an image of a credit card and wanted to put on our site. The image was able to be uploaded, but that was it.

Maybe the "broken data stream" or corrupt file can be checked upon upload?

The error returned was..

File "/usr/local/lib/python3.7/site-packages/PIL/ImageFile.py", line 59, in raise_ioerror
raise IOError(message + " when reading image file")
OSError: broken data stream when reading image file

full error message attached.

django_error.txt

here is the image (if it is any use?)..

Scotia-Amex-Gold-219x138

robnardo avatar Dec 02 '19 19:12 robnardo