django-imagekit
Automated image processing for Django models.
What it is and what it does
django-imagekit is a Django app that automates image processing by letting you define image transformations declaratively on your models. Instead of manually resizing, cropping, or converting images in views or signals, you specify what you want—a thumbnail, a black-and-white version, a resized copy—using image specs, and ImageKit generates and serves them on demand. It works by attaching ImageSpecField or ProcessedImageField to your Django models, each backed by a set of processors (resize, crop, format conversion, etc.) that transform a source image into a derived one.
The package comes with built-in processors for common tasks like resizing and cropping, and you can write custom processors for specialized transformations. Image specs can be defined on models for automatic generation, used directly in views for programmatic control, or registered and invoked from templates. The generated images are typically cached so repeated requests don't re-process the source. It depends on pilkit for the actual image manipulation and django-appconf for Django settings integration.
Use it for:
- Generate and serve user avatar thumbnails automatically when a profile image is uploaded.
- Create multiple derived image sizes (mobile, tablet, desktop) from a single source upload.
- Convert uploaded images to a standard format or quality level without storing the original.
- Build image galleries that display resized previews without manual pre-processing.
- Apply consistent image transformations (crop, rotate, filter) across a Django app from template tags.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automated image processing for Django models—generates thumbnails, resized versions, and transformed images from uploaded files using declarative specs.
Yes. django-imagekit is a mature, actively maintained package (production-stable, recent commits, 2349 GitHub stars) with low install friction and no known vulnerabilities. It solves a common Django problem—automated image processing—cleanly and declaratively. The BSD license is permissive. Install it if you need to generate derived images from user uploads or other sources in a Django project.
Install
django-imagekit on PyPI
pip
pip install django-imagekituv
uv add django-imagekitpoetry
poetry add django-imagekitInstalling django-imagekit
Before you install
Low install friction with only two runtime dependencies (django-appconf and pilkit). Active maintenance with recent commits and a stable production status.
License in practice
BSD license permits commercial and private use with minimal restrictions—no copyleft obligations or patent clauses to navigate.
Quickstart
pip install django-imagekit
from django.db import models
from imagekit.models import ImageSpecField
from imagekit.processors import ResizeToFill
class Profile(models.Model):
avatar = models.ImageField(upload_to='avatars')
avatar_thumbnail = ImageSpecField(
source='avatar',
processors=[ResizeToFill(100, 50)],
format='JPEG',
options={'quality': 60}
)
profile = Profile.objects.first()
print(profile.avatar_thumbnail.url)
Requires Pillow to be installed separately for image processing; Django and a configured image storage backend are prerequisites.
Verify before relying
- Whether generated images are cached or regenerated on each access
- Storage backend options beyond the default file system
- Performance characteristics with large image volumes or concurrent processing
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django-appconf, pilkit |
| Maintenance | actively maintained — 173 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 521,390/month — #6,207 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_imagekit-6.1.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
easy-thumbnailsGenerates and manages thumbnail images for…
permissive · top 15,000 on PyPI
imagekitioPython client library for the ImageKit REST…
permissive · top 15,000 on PyPI
sorl-thumbnailGenerates and caches image thumbnails for…
permissive · top 15,000 on PyPI
pilkitPILKit provides a collection of image…
permissive · top 15,000 on PyPI
django-versatileimagefieldExtends Django's ImageField with flexible image…
permissive · top 15,000 on PyPI
django-cloudinary-storageIntegrates Django with Cloudinary to serve…
permissive · top 15,000 on PyPI
libthumborlibthumbor generates encrypted URLs for the…
permissive · top 15,000 on PyPI
django-cleanupAutomatically deletes old files when Django…
permissive · top 15,000 on PyPI
ExifReadExtracts Exif metadata from digital image files…
unclear · top 5,000 on PyPI