Auto Generate/Save Thumbnails using Template Filter (scale max_x, max_y, or both)
Couldn't get the original to work, and wanted more functionality (scale on x or y coordinates) <img src="{{ object.image.url }}" alt="original image"> <img src="{{ object.image|thumbnail:"250w" }}" alt="image resized to 250w x (calculated/scaled)h "> <img src="{{ object.image|thumbnail:"250h" }}" alt="image resized to (calculated/scaled)w x 250h h "> <img src="{{ object.image|thumbnail:"250x200" }}" alt="image resized to 250wx200h "> <img src="{{ object.image|thumbnail }}" alt="image resized to default 200w (or whatever you default it to) format"> Original http://www.djangosnippets.org/snippets/192/ Adapted http://www.djangosnippets.org/snippets/955/ Sampled From: http://batiste.dosimple.ch/blog/2007-05-13-1/ http://vaig.be/2008/05/17/stdimagefield-improved-image-field-for-django/
- template
- filter
- image
- template-filter
- thumbnail
- templatetags