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 met the same problem in Ubuntu server, then you can fix it by installing libjpeg-dev before PIL.
sudo apt-get install libjpeg-dev
sudo pip install PIL --upgrade
and if you already installed libjpeg-dev after PIL. then you can remove PIL first, and try to reinstall PIL as following.
sudo pip uninstall PIL
sudo apt-get install libjpeg-dev
sudo pip install PIL
It works for me, and hope it works for you.