Imported Markdown (or HTML) - Image attachments w/o file extensions, not displayed - How to fix? #7317
Replies: 1 comment 7 replies
-
Hi @zereshk146! I'm Dosu and I’m helping the Trilium team. Trilium doesn't display images if the attachment lacks a file extension—this is a known limitation of its importers for Markdown and HTML. The filename for attachments is based on the note or attachment title and its MIME type, but if Trilium can't confidently infer the extension, the file may be saved without one, causing the broken image icon you see. There's no built-in feature to batch-rename attachments or add missing extensions after import, so the usual workaround is to manually download and rename the files with the correct extension, which then allows them to display properly in notes (source). For future imports, using an external tool like trilium-py can help: it uploads Markdown files with images, automatically handles image uploads, and fixes links, avoiding this issue (source). For existing attachments, you could use external scripts to identify file types (e.g., with the To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I migrated from another app, via Markdown import, incl. attachments, mostly images. Tried HTML, same result.
Many of those do not show a file extension, just a number, when viewed inside their folder - or the linked note.
They are visible in the attachments folder. I can download and rename them...
Those with extensions are displayed fine.
All others are just a number inside the note's text, with that icon 'broken-image-link' showing.
Is there any way I could rename those attachments - my idea... i.e. add the missing extension?
In other words: How to fix?
Reason for this, my guess at this point: I copy&pasted many of them from my screenshot app into the original notes app.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions