
Why SuperDoc Shows Only the Last Image: A DOCX Internals Investigation
While integrating DOCX generation into our document editor pipeline, I ran into one of the most confusing rendering issues I have seen so far. A DOCX generated with multiple images displayed perfectly in Word, LibreOffice, and Google Docs. But inside the SuperDoc editor, every image slot showed the same image. Always the last one. This post is not about a final fix yet. It is a breakdown of the debugging journey and what I discovered while tracing the root cause. The Symptom The generated report contained multiple property images arranged in a grid. Expected inside editor: Image 1 → slot 1 Image 2 → slot 2 Image 3 → slot 3 Actual result inside SuperDoc: Slot 1 → last image Slot 2 → last image Slot 3 → last image Every slot displayed the same image. Strangely: Microsoft Word → correct LibreOffice → correct Google Docs → correct SuperDoc editor → wrong So the DOCX itself was valid. The issue appeared editor-specific. Environment Tool Version SuperDoc 1.16.x docx-templates 4.15.0 Node 20.
Continue reading on Dev.to
Opens in a new tab

