File layout
Drawings on disk use a portable pair: the .excalidraw JSON file plus a sibling assets/ folder for attachments.
drawing.excalidraw
assets/
<fileId>.png
Exported PNGs from the CLI (or PNG/SVG you save via Export image…) can live in the same folder as the drawing or anywhere you choose in the save dialog. The CLI writes next to the .excalidraw file by default unless you pass --out.
How attachments work
- On image import, the wrapper copies the file into the sibling
assets/folder next to the.excalidrawfile - The
.excalidrawJSON stores relativeassets/...references (not absolute paths to the original file) - On open, the wrapper rehydrates Excalidraw
BinaryFilesfrom that folder so reopen never loses attachments - Moving or copying the drawing: keep the
.excalidrawfile and itsassets/folder together
This applies to attachment types upstream Excalidraw supports (images first).