Skip to content

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.

ActionHow
Insert into the documentEnter, the context menu, or drag the file into the editor
RenameF2 — only the name is edited, the extension stays
Movedrag onto a folder, or M for Move to…
DeleteDelete — asks first and tells you how often the image is used
New folder, uploadthe buttons at the top of the panel, or a folder’s context menu
Copy the Markdown pathcontext menu → Copy Markdown path

Hover a file for a larger preview with its dimensions.

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.

  • 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 outside assets/ are reported as asset-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.