From 9f5b6eaa8feed92b4dcb0e4dc90f70a46c401e21 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Wed, 15 Apr 2026 12:17:28 +0300 Subject: fix: configure Sphinx to prefer WebP for HTML output Sphinx 7.2.x does not include image/webp in the HTML builder default supported_image_types, so wildcard references resolved to PNG. Patch the priority list so HTML builds select WebP while LaTeX stays unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index e87def82..b2c871c5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -199,4 +199,12 @@ texinfo_documents = [ def setup(app): - pass \ No newline at end of file + # Prefer WebP for HTML output; LaTeX keeps its default (PDF/PNG/JPEG) + from sphinx.builders.html import StandaloneHTMLBuilder + StandaloneHTMLBuilder.supported_image_types = [ + 'image/webp', + 'image/svg+xml', + 'image/png', + 'image/gif', + 'image/jpeg', + ] \ No newline at end of file -- cgit v1.2.3