Automatically resizing images with Django
Posted by David on April 7, 2008 at 2:36 p.m.
Maybe, like me, you'd like to resize images automatically when they are uploaded and saved to you Django site. If so, here's how I did it (Django Snippet here__):: from PIL import Image class Photo(models.Model): source = models.ImageField(upload_to='images') def save(self, size=(400, 300)): """ Save Photo after ensuring it is not ...
