diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4868abc8..efbf1190 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,7 @@ Change log This enables easier interoperability of FeinCMS content types with feincms3 plugins. - Added Python 3.11. +- Fixed the Pillow resampling constant. `v23.1.0`_ (2023-03-09) diff --git a/feincms/templatetags/feincms_thumbnail.py b/feincms/templatetags/feincms_thumbnail.py index 2c774406..9f1b9d5d 100644 --- a/feincms/templatetags/feincms_thumbnail.py +++ b/feincms/templatetags/feincms_thumbnail.py @@ -122,7 +122,7 @@ def generate(self, storage, original, size, miniature): w, h = int(size["w"]), int(size["h"]) format = image.format # Save format for the save() call later - image.thumbnail([w, h], Image.ANTIALIAS) + image.thumbnail([w, h], Image.Resampling.LANCZOS) buf = BytesIO() if format.lower() not in ("jpg", "jpeg", "png"): format = "jpeg" @@ -182,7 +182,7 @@ def generate(self, storage, original, size, miniature): y_offset + int(crop_height), ) ) - image = image.resize((dst_width, dst_height), Image.ANTIALIAS) + image = image.resize((dst_width, dst_height), Image.Resampling.LANCZOS) buf = BytesIO() if format.lower() not in ("jpg", "jpeg", "png"):