Django PIL Error - The file you uploaded was either not an image or a corrupted image.

When uploading an image with Django admin, or a Django based CMS, you receive the following error:

Upload a valid image. The file you uploaded was either not an image or a corrupted image.

The solution, on CentOS, Red Hat and Fedora, is to ensure that Python Image Library (PIL) is installed and compiled after libjpeg-devel is installed:

sudo yum install libjpeg-devel
workon mysite
pip uninstall PIL
pip install PIL

This will compile PIL with the correct JPG support and fix the error above.

— Andrew


Next entry

Previous entry

Related entries

Similar entries


Comments

No comments yet.


Pingbacks

Pingbacks are open.


Post your comment





Site theme originally by styleshout.com