0

I am using easy-thumbnails to generate thumbnails for images uploaded. In the dev environment, thumbnails are properly generated and uploaded to S3 for png and jpg files. However, in production, only thumbnails for png images are generated, not jpg. I cant figure out why - please help?

Setup

  1. ubuntu 14.04
  2. nginx
  3. django 1.7.5 & Python 2.7

Update

Following Mark Galloway's excellent advice, I installed the requirements advised in the Pillow docs:

sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

then reinstalled pillow with:

sudo pip install -I pillow

And finally for good measure restarted gunicorn.

RunLoop
  • 20,288
  • 21
  • 96
  • 151

1 Answers1

1

You need to install an additional library for pillow JPEG support on ubuntu. Maybe you missed it?

sudo apt-get install libjpeg-dev
pip install -I pillow
Mark Galloway
  • 4,050
  • 19
  • 26
  • Thanks Mark. I did not have libjpeg installed. However, the pip install threw an exception (see update to my question). I then stopped and restarted gunicorn and tried again but the jpegs are still not being generated. – RunLoop Jul 23 '15 at 06:18
  • 1
    You need to reinstall Pillow. Perhaps you need to be root to preform that? – Mark Galloway Jul 23 '15 at 06:32
  • I finally got it to work. Not sure why the first go did not, but on the second I installed the full list of requirements recommended by PIllow (see update to question) and then also did a sudo on the pip install. – RunLoop Jul 23 '15 at 06:34