I\'m trying to add images to my models in my Django app.
models.py
class ImageMain(models.Model):
product = models.ForeignKey(Product)
photo = mo
I had a similar problem and i had cleared it with referring below link:
http://osqa.sjsoft.com/questions/96/why-is-there-no-jpegpng-decoder-when-i-pip-install-pil-on-ubuntu
just do
sudo easy_install PIL
this will install PIL specific to your os. please make sure that the egg file generated in /usr/local/lib/python2.6/dist-packages/ is having egg information (because when i did the same, egg file was not correct). If not then just rename the PIL-build-specific-name to PIL and add a PIL.pth file in the dist-packages folder. write PIL in the PIL.pth file and you are done
I had this problem although on Linux not Mac, so might not be able to give too specific info. However you might need libjpeg-devel too (if there is a correspondent for Mac).
Also make sure to purge your current PIL installation completely from the system. And after you are sure libjpeg is installed properly then reinstall PIL with build_ext -i. Then run PIL's selftest.py to check if it gives the JPEG error.