From 84e87cc2cd98b82ec6c4334306ef8e74fff038ea Mon Sep 17 00:00:00 2001 From: "B.D. Murphy" <161863146+bdmurphy73@users.noreply.github.com> Date: Thu, 5 Nov 2026 09:26:09 -0800 Subject: [PATCH] fix: add image notes to DOCX/DOCM import - Add image notes for all images found in the Word document - Images are stored with their binary data and MIME type in the notes --- umbraedit/formats/fromdocx.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/umbraedit/formats/fromdocx.py b/umbraedit/formats/fromdocx.py index 8762c63fa..23e6270a3 100644 --- a/umbraedit/formats/fromdocx.py +++ b/umbraedit/formats/fromdocx.py @@ -368,6 +368,17 @@ class FromDocxDocument: ) self._result.notes.append(note) + # Add image notes for images found in the document + for img in self._result.images: + note = ImportNote( + note_type="image", + source=f"image file: {img.filename}", + text=f"Image: {img.filename}", + data=img.data, + mime=img.mime, + ) + self._result.notes.append(note) + def _parse_paragraph(self, para: ET.Element) -> dict | None: """Parse a single paragraph element and return its content.""" # Get paragraph style