sorl-thumbnail
Thumbnails for Django
Decision gist · record as of 2026-08-14
Yes. sorl-thumbnail is a mature, actively maintained solution for a common Django need. It has no runtime dependencies, low install friction, permissive licensing, and zero known vulnerabilities. Install it if you need thumbnail generation in a Django project and want a pluggable, battle-tested approach. The only gotcha is ensuring your chosen image engine and its system dependencies are installed separately.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django 4.2 or later and Python 3.10 or later.
- An image processing engine (Pillow, ImageMagick, Wand, etc.) must be installed separately and configured.
- Low install friction with no runtime dependencies.
License · maintenance · safety
permissive license (permissive) — BSD license (permissive). You may use, modify, and distribute sorl-thumbnail freely in commercial and private projects, provided you retain the copyright notice and disclaimer.
last release 2026-01-22 (204 days) · last repo commit 2026-08-10 · 1,795 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 524,380 downloads/mo, #6,190 on PyPI
Alternatives
Verify before relying
pip install sorl-thumbnail
# In Django settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = [
'sorl.thumbnail',
]
# In a template:
{% load thumbnail %}
{% thumbnail item.image "100x100" crop="center" as im %}
<img src="{{ im.url }}" alt="">
{% endthumbnail %}
# Or in Python:
from sorl.thumbnail import get_thumbnail
im = get_thumbnail(my_file, '100x100', crop='center', quality=99)- Whether the package's performance on cloud storage (S3, etc.) meets your latency requirements without the THUMBNAIL_FORCE_OVERWRITE workaround.
- Specific compatibility with your chosen image engine (Pillow, ImageMagick, Wand, pgmagick, or vipsthumbnail) and its system dependencies.
What it is and what it does
sorl-thumbnail is a Django app that generates, caches, and serves image thumbnails on demand. It abstracts the thumbnail generation pipeline behind a simple template tag and Python API, letting you specify dimensions, cropping strategy, and quality once and reuse them across your site. The package supports multiple image processing engines (Pillow, ImageMagick, Wand, pgmagick, vipsthumbnail) and storage backends (filesystem, S3, Redis, DynamoDB), so you can swap implementations without changing your code.
The core workflow is straightforward: you request a thumbnail at a given size and crop mode, sorl-thumbnail generates it if it doesn't exist, caches the result in a key-value store (database, Redis, or DynamoDB), and returns the URL. It handles admin integration, placeholder generation, smart cropping with border removal, and alternative resolutions. The package is actively maintained by the Jazzband community, supports current Django and Python versions, and has no runtime dependencies—you only install the image engine you need.
Use it for
- Generate responsive image thumbnails in Django templates without writing image processing code.
- Cache thumbnails in Redis or DynamoDB to avoid regenerating them on every request.
- Serve thumbnails from cloud storage (S3) with smart cropping and multiple resolution variants.
- Automatically delete cached thumbnails when an ImageField is removed from a model.
- Swap image processing engines (Pillow to ImageMagick) by changing a setting, not code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
sorl-thumbnail is a mature, actively maintained solution for a common Django need. It has no runtime dependencies, low install friction, permissive licensing, and zero known vulnerabilities. Install it if you need thumbnail generation in a Django project and want a pluggable, battle-tested approach. The only gotcha is ensuring your chosen image engine and its system dependencies are installed separately.
Install
sorl-thumbnail on PyPI
Before you install
Low install friction with no runtime dependencies. Active maintenance with recent commits and a Jazzband community project backing it. Supports current Django versions (4.2, 5.0, 5.1, 5.2) and modern Python (3.10–3.13).
Requires Django 4.2 or later and Python 3.10 or later. An image processing engine (Pillow, ImageMagick, Wand, etc.) must be installed separately and configured.
License in practice
BSD license (permissive). You may use, modify, and distribute sorl-thumbnail freely in commercial and private projects, provided you retain the copyright notice and disclaimer.
Quickstart
pip install sorl-thumbnail
# In Django settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = [
'sorl.thumbnail',
]
# In a template:
{% load thumbnail %}
{% thumbnail item.image "100x100" crop="center" as im %}
<img src="{{ im.url }}" alt="">
{% endthumbnail %}
# Or in Python:
from sorl.thumbnail import get_thumbnail
im = get_thumbnail(my_file, '100x100', crop='center', quality=99)
Verify before relying
- Whether the package's performance on cloud storage (S3, etc.) meets your latency requirements without the THUMBNAIL_FORCE_OVERWRITE workaround.
- Specific compatibility with your chosen image engine (Pillow, ImageMagick, Wand, pgmagick, or vipsthumbnail) and its system dependencies.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 204 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 524,380 / month, #6,190 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Multimedia :: Graphics |
Evidence: sorl_thumbnail-13.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django thumbnail generation”
- sorl-thumbnailGenerates and caches image thumbnails for Django applications, with…
- easy-thumbnailsGenerates and manages thumbnail images for Django applications,…
- django-imagekitAutomated image processing for Django models—generates thumbnails,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also django-versatileimagefield · easy-thumbnails · libthumbor · django-imagekit · Willow · django-cleanup · pyobjc-framework-QuickLookThumbnailing · pillow · django-embed-video · django-tastypie