diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py index 1a6d4f6d5c..6268604980 100644 --- a/sphinx/transforms/post_transforms/images.py +++ b/sphinx/transforms/post_transforms/images.py @@ -197,12 +197,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: def match(self, node: nodes.image) -> bool: if not self.app.builder.supported_image_types: return False + elif '?' in node['candidates']: + return False elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types): # builder supports the image; no need to convert return False - elif node['uri'].startswith('data:'): - # all data URI MIME types are assumed to be supported - return False elif self.available is None: # store the value to the class variable to share it during the build self.__class__.available = self.is_available()