in source/ext/extref.py [0:0]
def _image_tag(self, image_path):
doc_dir = os.path.dirname(self.state.document.attributes['source'].replace(str(self._env().app.srcdir), ''))[1:]
return '<img alt="{0}" title="{1}" src="{2}" style="{3}{4}"/>'.format(
self._alt(), self._title(), os.path.relpath(image_path, doc_dir),
self._width_tag_option(), self._height_tag_option()
)