--- id: sorl-thumbnail version: "13.0.0" license: Copyright (c) 2010, Mikko Hellsing All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:… (full text in the JSON record) license_treatment: permissive maintenance: active --- # sorl-thumbnail — Thumbnails for Django License: permissive · Maintenance: active · Downloads: 524.4K/mo ## 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 above — verify before relying. Generates and caches image thumbnails for Django applications, with pluggable support for multiple image engines and storage backends. 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 pip install sorl-thumbnail uv add sorl-thumbnail poetry add sorl-thumbnail ## Installing sorl-thumbnail 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). 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 %} {% endthumbnail %} # Or in Python: from sorl.thumbnail import get_thumbnail im = get_thumbnail(my_file, '100x100', crop='center', quality=99) 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. 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: Copyright (c) 2010, Mikko Hellsing All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 524.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django thumbnail generation, image resizing django, thumbnail caching, django image processing, pillow imagemagick integration, django storage thumbnails, smart crop thumbnails, django-extension, image-processing, caching [View on SkillFed](https://skillfed.io/packages/sorl-thumbnail) · [View on PyPI](https://pypi.org/project/sorl-thumbnail/)