diff options
| -rw-r--r-- | docs/conf.py | 12 |
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): |
