{"id":23594,"library":"django-resized","title":"Django-Resized","description":"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.","status":"active","version":"1.0.3","language":"python","source_language":"en","source_url":"https://github.com/un1t/django-resized","tags":["django","image","resize","upload","thumbnails"],"install":[{"cmd":"pip install django-resized","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for image processing","package":"Pillow","optional":false},{"reason":"Provides framework integration (ModelField)","package":"Django","optional":false}],"imports":[{"note":"Correct import path since 1.0 (previously from 'django_resized.forms').","symbol":"ResizedImageField","correct":"from django_resized import ResizedImageField"}],"quickstart":{"code":"from django.db import models\nfrom django_resized import ResizedImageField\n\nclass MyModel(models.Model):\n    image = ResizedImageField(size=[800, 600], crop=['middle', 'center'], upload_to='uploads/')\n","lang":"python","description":"Define a model with a ResizedImageField that automatically resizes images to 800x600, cropping from the center."},"warnings":[{"fix":"Use 'from django_resized import ResizedImageField' instead of 'from django_resized.forms import ResizedImageField'.","message":"Import path changed in v1.0: from 'django_resized.forms' to 'django_resized'.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always pass a list with exactly two valid values, e.g., crop=['middle', 'center'].","message":"'crop' parameter requires a list of two strings: ['top','bottom'] or ['left','right']; using a single string or invalid values silently fails.","severity":"gotcha","affected_versions":"all"},{"fix":"If you need both original and resized, use a separate field for original or use a different library like django-imagekit.","message":"ResizedImageField does not preserve original image; the uploaded file is replaced by the resized version.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from django_resized import ResizedImageField'.","cause":"In version 1.0, the module structure changed; 'forms' submodule removed.","error":"ImportError: cannot import name 'ResizedImageField' from 'django_resized.forms'"},{"fix":"Set 'quality' parameter or ensure uploaded images don't have alpha, or use a library that handles conversion.","cause":"Uploaded image has transparency (RGBA) but output format is JPEG, which doesn't support alpha.","error":"OSError: cannot write mode RGBA as JPEG"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}