Errors on ThumbnailerImageField uploads #160

staticdev opened this Issue Jun 28, 2012 · 2 comments


None yet

2 participants


I am using Django 1.5alpha0, installed with pip and put 'easy_thumbnails' on the settings file. And also put: THUMBNAIL_DEBUG = True

I just created a model with the field:
thumbnail = ThumbnailerImageField(verbose_name=u"Photo", upload_to='uploads/profile_photos', max_length=100, default='images/default_avatar.png', resize_source=dict(size=(128, 128), crop='smart'))

Nothing references the field specifically in my I created the folder uploads/profile_photos in the /media folder. But when I post a form using JPGs or PNGs, the value stored in the database is always images/default_avatar.png and no file inside the folders I created. And I see no messages or errors provided by the THUMBNAIL_DEBUG.

I'm using an isolated virutalenv installed with:
-e git://

UPDATED: I discovered I have to put enctype="multipart/form-data" in the 'form' tag, like in Django's FileField. But in the Installation ou Usage documentation nothing mentions that. I suggest to put it in the front page of the app. Despite that, I continue having troubles. See my comment below.


After I change my template to put the enctype="multipart/form-data" in the 'form' tag, still when submitting the forms I get the validation error message:
Upload a valid image. The file you uploaded was either not an image or a corrupted image. (when I use both PNG and JPG images).

And when I try GIF images, I get:

IOError at /people/add/
encoder jpeg not available

Request Method: POST
Request URL:
Django Version: 1.5.dev20120629131041
Exception Type: IOError
Exception Value:

encoder jpeg not available
Exception Location: /home/static/virtualenvs/prp/local/lib/python2.7/site-packages/PIL/PIL/ in _getencoder, line 401
Python Executable: /home/static/virtualenvs/prp/bin/python
Python Version: 2.7.2


PIL configuration error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment