summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 7f302ceb..ec1827ca 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -210,15 +210,11 @@ texinfo_documents = [
def _prefer_webp(app):
- """Add WebP to front of supported types for HTML/dirhtml builders only."""
+ """Prepend WebP to supported image types for HTML builders."""
if app.builder.name in ('html', 'dirhtml', 'readthedocs'):
- app.builder.supported_image_types = [
- 'image/webp',
- 'image/svg+xml',
- 'image/png',
- 'image/gif',
- 'image/jpeg',
- ]
+ types = app.builder.supported_image_types
+ if 'image/webp' not in types:
+ app.builder.supported_image_types = ['image/webp'] + types
def setup(app):