diff --git a/docs/changelog.rst b/docs/changelog.rst index a03f8c61..c5c3b8cf 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,6 +9,9 @@ Not released yet. Sigal now requires Python 3.7+. +- Add option ``max_img_pixels`` to allow processing huge images (sets + ``PIL.Image.MAX_IMAGE_PIXELS``) [:issue:`431`]. +- Add webp to the list of images formats supported by default [:issue:`433`]. Version 2.2 ~~~~~~~~~~~ diff --git a/sigal/settings.py b/sigal/settings.py index 5a510609..fe583447 100644 --- a/sigal/settings.py +++ b/sigal/settings.py @@ -40,7 +40,8 @@ 'google_tag_manager': '', 'ignore_directories': [], 'ignore_files': [], - 'img_extensions': ['.jpg', '.jpeg', '.png', '.gif', '.tif', '.tiff'], + 'img_extensions': ['.jpg', '.jpeg', '.png', '.gif', '.tif', '.tiff', + '.webp'], 'img_processor': 'ResizeToFit', 'img_size': (640, 480), 'img_format': None, diff --git a/tests/sample/pictures/webp/_MG_7805_lossy80.webp b/tests/sample/pictures/webp/_MG_7805_lossy80.webp new file mode 100644 index 00000000..e990dff0 Binary files /dev/null and b/tests/sample/pictures/webp/_MG_7805_lossy80.webp differ diff --git a/tests/sample/pictures/webp/_MG_7808_lossy80.webp b/tests/sample/pictures/webp/_MG_7808_lossy80.webp new file mode 100644 index 00000000..09248fd7 Binary files /dev/null and b/tests/sample/pictures/webp/_MG_7808_lossy80.webp differ diff --git a/tests/test_gallery.py b/tests/test_gallery.py index 518dd873..29ef0426 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -62,11 +62,17 @@ 'video': { 'title': 'video', 'name': 'video', - 'thumbnail': ('video/thumbnails/' - 'example%20video.tn.jpg'), + 'thumbnail': 'video/thumbnails/example%20video.tn.jpg', 'subdirs': [], 'medias': ['example video.ogv'] - } + }, + 'webp': { + 'title': 'webp', + 'name': 'webp', + 'thumbnail': 'webp/thumbnails/_MG_7805_lossy80.tn.webp', + 'subdirs': [], + 'medias': ['_MG_7805_lossy80.webp', '_MG_7808_lossy80.webp'] + }, }