Registry / web-framework / django-resized

django-resized

JSON →
library1.0.3pypypiunverified

Automatically resize image uploads in Django to a specified size. Current version 1.0.3, released sporadically. Lightweight replacement for django-imagekit for simple resize-on-upload scenarios.

pip install django-resized
INSTALL
IMPORT
SIG · DJANGO-RESIZED
D
django-resized
web-frameworkpythonv1.0.3
Install
1.5s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.0.3 · 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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

ResizedImageField
✓ from django_resized import ResizedImageField
✗ from django_resized import ResizedImageField

Define a model with a ResizedImageField that automatically resizes images to 800x600, cropping from the center.

from django.db import models from django_resized import ResizedImageField class MyModel(models.Model): image = ResizedImageField(size=[800, 600], crop=['middle', 'center'], upload_to='uploads/')
Debug
Known issues
breakingImport path changed in v1.0: from 'django_resized.forms' to 'django_resized'.
fix
Use 'from django_resized import ResizedImageField' instead of 'from django_resized.forms import ResizedImageField'.
affects: >=1.0.0
gotcha'crop' parameter requires a list of two strings: ['top','bottom'] or ['left','right']; using a single string or invalid values silently fails.
fix
Always pass a list with exactly two valid values, e.g., crop=['middle', 'center'].
affects: all
gotchaResizedImageField does not preserve original image; the uploaded file is replaced by the resized version.
fix
If you need both original and resized, use a separate field for original or use a different library like django-imagekit.
affects: all
Upgrade
Version history
1.0.3latest on PyPI · released Oct 14, 2024
Audit
Dependencies
PillowrequiredRequired for image processing
DjangorequiredProvides framework integration (ModelField)
Agent activity
25 hits · last 30 days
node
24
Resources
django-resized — pip install django-resized · libregistry