skillfed

django-imagekit

Automated image processing for Django models.

django-imagekit v6.1.0 521.4K downloads/30d#6,207 on PyPI2,349
Permissive license BSD Active released

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-imagekit

uv

uv add django-imagekit

poetry

poetry add django-imagekit

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Utilities

Tags

django image processingthumbnail generationimage resizing djangoautomated image transformationdjango imagekit specsimage field processingdjango image caching
django-integrationimage-processing

More Utilities packages