This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

The easiest way to create thumbnails for your images with Django. Works with any StorageBackend.


  • Easy to integrate in your code (no database changes, works as an ImageField)
  • Works perfectly with any StorageBackend
  • Generates thumbnails after image is uploaded into memory
  • Deletes thumbnails when the image file is deleted
  • Provides easy access to the thumbnails’ URLs (similar method as with ImageField)


  • Python 2.5+
  • Django 1.1+
  • PIL (Python Image Library)

Getting It

You can get Django-Thumbs by using pip or easy_install:

$ pip install django-thumbs
$ easy_install django-thumbs

If you want to install it from source, grab the git repository from github and run

$ git clone git://
$ cd django-thumbs
$ python install


  • Import it in your and replace ImageField with ImageWithThumbsField in your model
  • Add a sizes attribute with a list of sizes you want to use for the thumbnails
  • Make sure your have defined MEDIA_URL in your
  • That’s it!

Working example

from django.db import models
from django_thumbs.db.models import ImageWithThumbsField

class Person(models.Model):
    photo = ImageWithThumbsField(upload_to='images', sizes=((125,125),(200,200)))
    second_photo = ImageWithThumbsField(upload_to='images')

In this example we have a Person model with 2 image fields.

You can see the field second_photo doesn’t have a sizes attribute. This field works exactly the same way as a normal ImageField.

The field photo has a sizes attribute specifying desired sizes for the thumbnails. This field works the same way as ImageField but it also creates the desired thumbnails when uploading a new file and deletes the thumbnails when deleting the file.

With ImageField you retrieve the URL for the image with: With ImageWithThumbsField you retrieve it the same way. You also retrieve the URL for every thumbnail specifying its size: In this example we use and to get the URL of both thumbnails.


At any time you can go back and use ImageField again without altering the database or anything else. Just replace ImageWithThumbsField with ImageField again and make sure you delete the sizes attribute. Everything will work the same way it worked before using django-thumbs. Just remember to delete generated thumbnails in the case you don’t want to have them anymore.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-thumbs-0.4.tar.gz (6.1 kB) Copy SHA256 Checksum SHA256 Source Apr 27, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting