*** Unmaintained ***
We're no longer using Thumbor for our image stack, and so this is unmaintained. Use at your own risk.
This plugin provides a way to pad in an image via Thumbor Filter.
pip install thumbor_padding
By adding FILTERS
in thumbor.conf
with thumbor_padding_filter
, for example:
FILTERS = [
# other filters....
'thumbor_padding_filter',
]
Add padding()
to thumbor url at filters
section, method signature is like this:
padding(<left>, <top>, <right>, <bottom> [, <color>])
You can omit color
, it will use white as the default.
For color
, use a valid hex code without the #.
Here are some examples:
http://thumbor/unsafe/filters:padding(10, 10, 20, 20)/your-image-url
http://thumbor/unsafe/filters:padding(10, 10, 20, 20, eee)/your-image-url
MIT