Skip "data:" URIs in ImageConverter

This commit is contained in:
Matthias Geier 2022-01-13 20:14:45 +01:00
parent 8ba20898b4
commit a73df1e0f2

View File

@ -200,6 +200,9 @@ class ImageConverter(BaseImageConverter):
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()