resize image on save

I recommend using StdImageField from django-stdimage, it should handle all the dirty work for you. It’s easy to use, you just specify the dimensions of the resized image in the field definition:

class MyModel(models.Model):
    image = StdImageField(upload_to='path/to/img',  size=(640, 480))

Check out the docs — it can do thumbnails also.

Leave a Comment