From b0ae5480c5b3a2778bf6b9aef428b42c0e6d8ac9 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 10 May 2022 17:35:00 -0400 Subject: [PATCH] Epub: Add WebP mime type When building docs with WebP images using the EPUB builder results in this warning: `WARNING: unknown mimetype for _images/.webp, ignoring` This commit fixes this by adding the mapping for webp-files to the correct mime type. --- sphinx/builders/_epub_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sphinx/builders/_epub_base.py b/sphinx/builders/_epub_base.py index 4bb602fe0c4..78d3d89a0ee 100644 --- a/sphinx/builders/_epub_base.py +++ b/sphinx/builders/_epub_base.py @@ -56,6 +56,7 @@ '.xhtml': 'application/xhtml+xml', '.css': 'text/css', '.png': 'image/png', + '.webp': 'image/webp', '.gif': 'image/gif', '.svg': 'image/svg+xml', '.jpg': 'image/jpeg',