Browse Source

Add webp support

pull/433/head
Simon Conseil 5 years ago
parent
commit
d770a66c5f
  1. 3
      sigal/settings.py
  2. BIN
      tests/sample/pictures/webp/_MG_7805_lossy80.webp
  3. BIN
      tests/sample/pictures/webp/_MG_7808_lossy80.webp
  4. 12
      tests/test_gallery.py

3
sigal/settings.py

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

BIN
tests/sample/pictures/webp/_MG_7805_lossy80.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
tests/sample/pictures/webp/_MG_7808_lossy80.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

12
tests/test_gallery.py

@ -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']
},
}

Loading…
Cancel
Save