Organising assets
Every document has its own assets/ folder for images. The Assets panel on the left of the editor shows it as a tree. Toggle the panel with macOS: ⇧⌘A, Windows and Linux: Ctrl+Shift+A.
Assets are images: PNG, JPEG, GIF, WebP, AVIF and SVG.
Working with the tree
Section titled “Working with the tree”| Action | How |
|---|---|
| Insert into the document | Enter, the context menu, or drag the file into the editor |
| Rename | F2 — only the name is edited, the extension stays |
| Move | drag onto a folder, or M for Move to… |
| Delete | Delete — asks first and tells you how often the image is used |
| New folder, upload | the buttons at the top of the panel, or a folder’s context menu |
| Copy the Markdown path | context menu → Copy Markdown path |
Hover a file for a larger preview with its dimensions.
References follow renames
Section titled “References follow renames”When you rename or move an image or a folder, MDLeaf rewrites the references in the document: inline images , inline links [](…) and reference definitions [id]: …. The toast says how many were updated. Rewrites are not part of undo, because undoing them would point at files that no longer exist.
References written as raw HTML (<img src="…">) are not rewritten.
Broken and unused images
Section titled “Broken and unused images”- A reference to an image that does not exist is an error (
asset-missing) in the gutter and the problems panel. Click it to jump to the reference. Paths outsideassets/are reported asasset-outside. - Images that the document does not reference carry an unused badge. Show unused only filters the tree; Delete unused assets… removes them all after confirmation (folders are kept).
Paths are relative to the document, like assets/figures/chart.png. MDLeaf writes paths with special characters percent-encoded (my%20figure.png) so they always work in Markdown.