Letterbox for sorl-thumbnail
This custom processor is meant for use with sorl-thumbnail to add letterboxing functionality. Add to your THUMBNAIL_PROCESSORS like so: `THUMBNAIL_PROCESSORS = ( 'sorl.thumbnail.processors.colorspace', 'sorl.thumbnail.processors.autocrop', 'sorl.thumbnail.processors.scale_and_crop', 'sorl.thumbnail.processors.filters', # custom processors 'utils.processors.ltbx', ) ` and then use in your templates like so: ` {% thumbnail model.img_field 200x150 ltbx as thumb %} <img src="{{ thumb }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />` Enjoy.
- image
- processor
- sorl