Welcome to django-versatileimagefield's documentation!
.. rst-class:: intro-paragraph A drop-in replacement for django's ``ImageField`` that provides a flexible, intuitive and :doc:`easily-extensible </writing_custom_sizers_and_filters>` interface for creating new images from the one assigned to the field. :doc:`Click here for a quick overview </overview>` of what it is, how it works and whether or not it's the right fit for your project.
The 1.2 release dropped support for Python 3.3.x.
The 1.4 release dropped support for Django 1.5.x & 1.6.x.
The 1.7 release dropped support for Django 1.7.x.
django-versatileimagefield is hosted on github.
Table of Contents
.. toctree:: :maxdepth: 4 overview installation model_integration specifying_ppoi using_sizers_and_filters writing_custom_sizers_and_filters deleting_created_images drf_integration improving_performance
- Fixed a 'race condition' bug that intermittently arose in some cloud storage providers which caused
VersatileImageFieldto fail when attempting to create a sized url from an image that hadn't finished uploading. A big thanks to @camflan for the stellar work (especially the improvements he contributed to the test suite)!
- Added Django 2.0.x and Django REST Framework 3.7.x compatibility.
- Added Pillow 5.0.x compatibility.
- Updated Pillow dependency. Pillow 2.4.0 thru 4.3.0 now supported in Python 2.7, 3.4, 3.5 and 3.6.
- Excluded tests from PyPI releases (thanks, @matthiask!).
- Fixed a bug with the widget if thumbnailing failed or crashed (thanks again, @matthiask!)
- Added a note about import problems when adding a new sizer/filter in Python 2.7 (thanks, @chubz!).
- Added LICENSE to package manifest (thanks, @sannykr!).
- Fixed a bug that prevented VersatileImageField from working when
null=Truewith Django 1.11 (thanks, @szewczykmira!).
- Added support for Pillow 4.0 and Python 3.6 (thanks, @aleksihakli!)
- Improved docs for writing custom sizers and filters (thanks, @njamaleddine!)
- Added support for Pillow 3.4.2
- Logs are now created when thumbnail generation fails (thanks, @artursmet!!!).
- Added support for Django 1.10.x and djangorestframework 3.5.x.
- Fixed a bug that caused :ref:`delete_all_created_images() <deleting-multiple-renditions>` to fail on field instances that didn't have filtered, sized & filtered+sized images.
- Fixed a bug that prevented sized images from deleting properly when the field they were associated with was using a custom
upload_tofunction. If you are using a custom
SizedImagesubclass on your project then be sure to check out :ref:`this section <ensuring-sized-images-deleted>` in the docs. (Thanks, @Mortal!)
- Fixed a bug that was causing placeholder images to serialize incorrectly with
- Ensured embedded ICC profiles are preserved when creating new images (thanks, @gbts!).
- Added support for progressive JPEGs (more info :ref:`here <versatileimagefield-settings>`).
- Included JPEG resize quality to sized image keys.
VERSATILEIMAGEFIELD_SETTINGS['image_key_post_processor']setting for specifying a function that will post-process sized image keys to create simpler/cleaner filenames.
django-versatileimagefieldships with two built-in post processors:
'versatileimagefield.processors.md5_16'(more info :ref:`here <versatileimagefield-settings>`).
- Added the ability to delete images & cache entries created by a
VersatileImageFieldboth :ref:`individually <deleting-individual-renditions>` and :ref:`in bulk <deleting-multiple-renditions>`. Relevant docs :doc:`here </deleting_created_images>`.
- Fixed a critical bug that broke initial project setup (i.e. when
django.setup()is run) when an app config path was included in
INSTALLED_APPS(as opposed to a 'vanilla' python module).
- Fixed a bug that caused
collectstaticto fail when using placeholder images with external storage, like Amazon S3 (thanks, @jelko!).
VersatileImageFieldnow returns its placeholder URL if
.urlis accessed directly (previously only placeholder images were returned if a sizer or filter was accessed). Thanks (again), @jelko!
- Fixed a bug that caused
collectstaticto fail when using
- Dropped support for Python 3.3.x.
- Added support for Django 1.9.x.
- Re-added support for Django 1.5.x (by request, support for Django 1.5.x was previously dropped in the 0.4 release). If you're using
django-versatileimagefieldon a Django 1.5.x project please be sure to read :ref:`this bit of documentation <django-15-admin-note>`.
- Added support for Django REST Framework 3.3.x.
VersatileImageFieldSerializerto serve image URLs as absolute URIs (if its associated field's storage class isn't doing so already).
- Formerly: /media/headshots/jane_doe_headshot.jpg
- Now: http://localhost:8000/media/headshots/jane_doe_headshot.jpg
- Fixed image preview on form validation errors (thanks, @securedirective!).
- Finessed/improved widget functionality for both optional and 'PPOI-less' fields (thanks, @SebCorbin!).
- Addressed Django 1.9 deprecation warnings (
VersatileImageFieldformfield to be overriden via
- Removed clear checkbox from widgets on required fields.
- Squashed a critical bug in OnDiscPlaceholderImage
- Added support for Django 1.8.
- Numerous documentation edits/improvements.
- Added django.contrib.staticfiles integration to widgets.
- Squashed a bug that was throwing an
AttributeErrorwhen uploading new images.
- Squashed a bug that raised a
ValueErrorin the admin when editing a model instance with a
- Admin 'click' widget now works in Firefox.
django-versatileimagefieldis now available for installation via wheel.
- Squashed a bug that was causing the admin 'click' widget to intermittently fail
- Simplified requirements installation (which makes django-versatileimagefield installable by
editable=Falseby default to address a bug that consistently raised
ValidationErrorin ModelForms and the admin
- Squashed a bug that prevented
PPOIFieldfrom serializing correctly
- Squashed an installation bug with
- Added Python 3.3 & 3.4 compatibility
- Improved cropping with extreme PPOI values
- Dropped support for Django 1.5.x
- Introducing per-field :ref:`placeholder image <defining-placeholder-images>` image support! (Note: global placeholder support has been deprecated.)
- Added the
VERSATILEIMAGEFIELD_USE_PLACEHOLDITsetting (:ref:`docs <placehold-it>`)
- Squashed a pip installation bug.
- Added a test suite with Travis CI and coveralls integration.
- Introduced support for :doc:`Django REST Framework 3.0 </drf_integration>` serialization.
- Ensuring :ref:`admin widget <ppoi-formfield>`-dependent thumbnail images are created even if
VERSATILEIMAGEFIELD_SETTINGS['create_on_demand']is set to
- Introduced :doc:`Django REST Framework support </drf_integration>`!
- Added ability to turn off on-demand image creation and pre-warm images to :doc:`improve performance </improving_performance>`.
CroppedImagebug that was causing black stripes to appear on crops of images with PPOI values that were to the right and/or bottom of center (greater-than 0.5).
- Overhauled how
CroppedImageprocesses PPOI value when creating cropped images. This new approach yields significantly more accurate results than using the previously utilized
ImageOps.fitfunction, especially when dealing with PPOI values located near the edges of an image or aspect ratios that differ significantly from the original image.
- Improved PPOI validation
- Squashed unset
cropSizer default resample to PIL.Image.ANTIALIAS
- Added support for auto-rotation during pre-processing as dictated by 'Orientation' EXIF data, if available.
- Added release notes to docs
- Converted giant README into Sphinx-friendly RST
- Docs added to readthedocs
- Initial open source release