Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Minimal interface for thumbor imaging service

Project description

Minimal interface for thumbor imaging service.


Easy thumbor URLs

Easily build thumbor URLs with arguments and filters by calling simple functions.

Default filters

Set default filters to be used on thumborized URLs. These filters can be overridden by any calls that specify the same filters with different parameters.

Flexible filters specification

Filters can be either a string delimited by :, a list or dict. See usage for more.


Easy, queryset like chaining for applying filters and resizing.

For a full list of available filters, check thumbor’s wiki.


from thumborize import ThumborURL

# Filters as string.
thumbor_url = ThumborURL("http://path/to/image.png", width=320,

# Filters as list.
thumbor_url = ThumborURL("http://path/to/image.png", width=320,
                         filters=["quality(80)", "grayscale()"])

# Filters as dict.
thumbor_url = ThumborURL("http://path/to/image.png", width=320,
                             "quality": "(80)",
                             "grayscale": "()",



from thumborize import ThumborURL

thumbor_url = ThumborURL("http://path/to/image.png")

small_gray_image = thumbor_url.grayscale().resize(width=100, height=100)


low_quality_image = thumbor_url.quality(40).width(200)

# Original ThumborURL instance.


import thumborize

thumborize.url("http://path/to/image.png", width=320, height=300)


{% load thumborize %}

<!-- Filters as string -->
<img src="{% thumborize some_url width=320 filters='quality(80):grayscale()' %}"/>

<!-- Filters as a list object -->
<img src="{% thumborize some_url width=320 filters=filter_list %}"/>


Install using pip:

$ pip install django-thumborize

In order to use django-thumborize templatetags, you must add the app to INSTALLED_APPS:

    # Other django apps..
    "thumborize", # Any order is fine.

Configure basic thumbor settings:

# Thumbor host URL.
THUMBOR_SERVER = "http://localhost:8888/"

# This key must be the same used in thumbor
# host to build safe URLs correctly.

# Default filters are optional.
    "quality": "(80)",
    "grayscale": "()",



First clone the repository, then run make install to install dev requirements.

Run tests

Run make test to run tests.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-thumborize, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size django-thumborize-1.0.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page