diff --git a/src/calibre/ebooks/docx/images.py b/src/calibre/ebooks/docx/images.py index bda3eb0d32..962bebb0af 100644 --- a/src/calibre/ebooks/docx/images.py +++ b/src/calibre/ebooks/docx/images.py @@ -184,7 +184,7 @@ class Images(object): img = IMG(src='images/%s' % src) img.set('alt', alt or 'Image') if link is not None: - self.links.append((img, link)) + self.links.append((img, link, self.rid_map)) return img def drawing_to_html(self, drawing, page): diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index a7afb5445a..01bb915dcb 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -516,7 +516,7 @@ class Convert(object): continue span.set('href', url) - for img, link in self.images.links: + for img, link, relationships_by_id in self.images.links: parent = img.getparent() idx = parent.index(img) a = A(img)