Registry / web-framework / easy-thumbnails

easy-thumbnails

JSON →
library2.10.1pypypiunverified

Easy Thumbnails is a powerful yet user-friendly Django application designed for generating and managing image thumbnails. It dynamically creates thumbnails based on a source image, supports predefined aliases, and integrates seamlessly with Django models and templates. The library is actively maintained, with the current stable version being 2.10.1, and releases occurring regularly to support new Django and Python versions.

pip install easy-thumbnails
INSTALL
IMPORT
SIG · EASY-THUMBNAILS
E
easy-thumbnails
web-frameworkpythonv2.10.1
Install
4.1s avg
Import
Disk
86MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.10.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 86.5MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.1s · import 0.000s · 87MB
86MB installed
● package 86MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ThumbnailerImageField
from easy_thumbnails.fields import ThumbnailerImageField
from easy_thumbnails.fields import ThumbnailerImageField

After installing and adding 'easy_thumbnails' to `INSTALLED_APPS`, run migrations. Define thumbnail aliases in `THUMBNAIL_ALIASES` in your `settings.py` for reusable thumbnail configurations. Integrate `ThumbnailerImageField` into your models. In templates, load the `thumbnail` tags and use the `thumbnail_url` filter with an alias, or the `thumbnail` tag with explicit size and options. For programmatic access, use `get_thumbnailer`.

import os # settings.py INSTALLED_APPS = [ # ... 'easy_thumbnails', ] THUMBNAIL_ALIASES = { '': { 'avatar': {'size': (50, 50), 'crop': True}, 'profile_square': {'size': (200, 200), 'crop': 'smart'}, }, } # models.py from django.db import models from easy_thumbnails.fields import ThumbnailerImageField class Profile(models.Model): user = models.OneToOneField('auth.User', on_delete=models.CASCADE) photo = ThumbnailerImageField(upload_to='profile_photos', blank=True, null=True) def __str__(self): return self.user.username # In a Django template (e.g., profile.html) # {% load thumbnail %} # <img src="{{ profile.photo|thumbnail_url:'avatar' }}" alt="{{ profile.user.username }} avatar" /> # Or, with custom options directly in template # {% load thumbnail %} # <img src="{% thumbnail profile.photo 100x100 crop %}" alt="Profile photo" /> # In Python code # from easy_thumbnails.files import get_thumbnailer # profile_instance = Profile.objects.get(pk=1) # if profile_instance.photo: # thumbnailer = get_thumbnailer(profile_instance.photo) # avatar_url = thumbnailer['avatar'].url # print(f"Avatar URL: {avatar_url}") # Run migrations after adding to INSTALLED_APPS and defining models: # python manage.py migrate easy_thumbnails
Debug
Known issues
breakingVersion 2.10.0 dropped support for Python 3.8 and Django 4.1 and earlier. Ensure your project meets the new minimum requirements.
fix
Upgrade Python to 3.9+ and Django to 4.2+ (Django 5.1+ supported).
affects: >=2.10.0
breakingVersion 2.8.0 removed the `THUMBNAIL_HIGH_RESOLUTION` and `THUMBNAIL_HIGHRES_INFIX` settings. High-resolution support is now handled differently, if still needed, consult the latest documentation for alternatives.
fix
Remove these settings from your `settings.py`. Review documentation for retina/high-DPI display handling if previously used.
affects: >=2.8.0
gotchaIf you use multiple thumbnailing libraries (e.g., `sorl-thumbnail` and `easy-thumbnails`) in the same project, the default `{% load thumbnail %}` template tag might clash.
fix
Use `{% load easy_thumbnails_tags %}` instead of `{% load thumbnail %}` for `easy-thumbnails` in your templates to avoid conflicts.
affects: all
gotchaWhen using remote storage backends (e.g., S3), fetching image dimensions can be slow. This can impact performance for pages rendering many thumbnails.
fix
Enable `THUMBNAIL_SAVE_DIMENSIONS = True` in your `settings.py` to store thumbnail dimensions in the database, reducing calls to remote storage.
affects: all
deprecatedVersion 2.8.4 replaced deprecated Pillow constants against newer counterparts. While this is an internal change, older custom processors or direct Pillow interactions might need adjustment.
fix
Ensure your Pillow library is up-to-date and review any custom image processing logic for compatibility with newer Pillow versions.
affects: >=2.8.4
Upgrade
Version history
2.10.1latest on PyPI · released Aug 17, 2025
Audit
Dependencies
DjangorequiredCore dependency for the web framework.
PillowrequiredImage processing library (implicit dependency).
reportlaboptionalOptional dependency for SVG image thumbnailing support.
Agent activity
52 hits · last 30 days
node
46
OpenAI (training)
1
Resources
easy-thumbnails — pip install easy-thumbnails · libregistry