summaryrefslogtreecommitdiff
path: root/sphinx/builders/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r--sphinx/builders/html.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 7bfce0ad6..0fd5a43ef 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -47,6 +47,7 @@ from sphinx.highlighting import PygmentsBridge
from sphinx.util.console import bold, darkgreen # type: ignore
from sphinx.writers.html import HTMLWriter, HTMLTranslator, \
SmartyPantsHTMLTranslator
+from sphinx.environment.adapters.asset import ImageAdapter
from sphinx.environment.adapters.toctree import TocTree
from sphinx.environment.adapters.indexentries import IndexEntries
@@ -606,11 +607,12 @@ class StandaloneHTMLBuilder(Builder):
def copy_image_files(self):
# type: () -> None
- # copy image files
if self.images:
+ stringify_func = ImageAdapter(self.app.env).get_original_image_uri
ensuredir(path.join(self.outdir, self.imagedir))
for src in status_iterator(self.images, 'copying images... ', "brown",
- len(self.images), self.app.verbosity):
+ len(self.images), self.app.verbosity,
+ stringify_func=stringify_func):
dest = self.images[src]
try:
copyfile(path.join(self.srcdir, src),