Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A django app with templatetags for resizing images with thumbor
Python Makefile
branch: master
Failed to load latest commit information.
django_thumbor Added support for filters separated by `:` in the templatetag.
docs Fixed code styles.
testproject Removed rednose due to conflict on `--no-color` argument.
.gitignore Ignored sphinx docs `_build` dir.
.travis.yml Added django 1.8 to the test matrix
LICENSE Added MIT license. Fixed install not finding README.rst.
Makefile Removed parameter to show PyPI response when releasing.
README.rst Added gemnasium dependencies badge.
dev_requirements.txt Added `generate_url` helper. Added MIT license.



CI status on Travis CI Latest django-thumbor PyPI version Number of downloads for django-thumbor on PyPI Code coverage on Coveralls Dependency Status on Gemnasium

A django application to resize images using the thumbor service.


Both thumbor_url templatetag and the generate_url helper uses the same arguments as libthumbor, you can check the wiki for more info.

On templates:

{% load thumbor_tags %}
<img src="{% thumbor_url '/media/image.jpg' width=300 %}" width="300" />

Split filters with : (or use a list object):

{% load thumbor_tags %}
<img src="{% thumbor_url url filters='watermark(,-10,-10,20):brightness(10)' %}" />
<img src="{% thumbor_url url filters=filter_list %}" />

On code:

from django_thumbor import generate_url
resized = generate_url("/media/image.jpg", width=300)

There is an extra parameter to specify a custom server to be used instead of settings.THUMBOR_SERVER.

On templates:

{% load thumbor_tags %}
<img src="{% thumbor_url '/media/image.jpg' thumbor_server='http://localhost:8888/foo' width=300 %}" width="300" />

On code:

from django_thumbor import generate_url
custom_server = "http://localhost:8888/foo"
resized = generate_url(
    "/media/image.jpg", thumbor_server=custom_server, width=300)


pip install django-thumbor


Add the app to the INSTALLED_APPS:

    # ...

Here are the default settings that you can override:

# The host serving the thumbor resized images
THUMBOR_SERVER = 'http://localhost:8888'

# The prefix for the host serving the original images
# This must be a resolvable address to allow thumbor to reach the images
THUMBOR_MEDIA_URL = 'http://localhost:8000/media'

# The same security key used in the thumbor service to
# match the URL construction

# Default arguments passed to the `generate_url` helper or
# the `thumbor_url` templatetag



Fork, clone, create a virtualenv and run:

git clone git://
mkvirtualenv django-thumbor
make install


Add tests on testproject/tests, add code and run:

make test


@ricobl @avelino @Starou

Something went wrong with that request. Please try again.