Merge pull request #433 from saimn/webp

Add webp support
This commit is contained in:
Simon Conseil
2021-06-27 19:41:45 +02:00
committed by GitHub
5 changed files with 14 additions and 4 deletions

View File

@@ -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
~~~~~~~~~~~

View File

@@ -40,7 +40,8 @@ _DEFAULT_CONFIG = {
'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,

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -62,11 +62,17 @@ REF = {
'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']
},
}