Skip to content

Commit 6f221be

Browse files
committed
ImageConverter: ignore '?' image URIs
1 parent 2be0630 commit 6f221be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sphinx/transforms/post_transforms/images.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
197197
def match(self, node: nodes.image) -> bool:
198198
if not self.app.builder.supported_image_types:
199199
return False
200+
elif '?' in node['candidates']:
201+
return False
200202
elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):
201203
# builder supports the image; no need to convert
202204
return False
203-
elif node['uri'].startswith('data:'):
204-
# all data URI MIME types are assumed to be supported
205-
return False
206205
elif self.available is None:
207206
# store the value to the class variable to share it during the build
208207
self.__class__.available = self.is_available()

0 commit comments

Comments
 (0)