CharlesChou18 downloadsOrganizes note attachments into a same-name folder and syncs the folder and links when notes are renamed, moved, or deleted.
An open-source Obsidian plugin (minAppVersion: 1.6.6) that automatically saves pasted and dropped attachments into a dedicated folder matching the note's name, and keeps that folder and all note & canvas links synchronized whenever the note is renamed, moved, or deleted.
Obsidian's built-in Default location for new attachments setting falls short when you want one dedicated, self-contained folder per note:
assets/), mixing attachments from different notes in the same folder.Note Attachment Folder solves this end-to-end with three configurable folder modes and automatic lifecycle synchronization.



Notes/MyNote.md → attachments/Notes/MyNote/20261123143000_a1b2c3.png (or flat attachments/MyNote/...)Notes/MyNote.md → Notes/MyNote/...Notes/MyNote.md → Notes/MyNote.assets/...renameImagesOnSync)..md and .canvas links silently in a single pass and emits one summary notice instead of per-file Obsidian popups—preserving relative (./, ../), URL-encoded (%20), and CJK links while skipping code blocks and external URLs.Projects.md alongside Projects/SubNote.md), renaming Projects.md will never rename Projects/; only Projects.md's unshared attachments are migrated.isDesktopOnly: false, works on Desktop & Mobile, zero telemetry or network requests).Assuming a note at Notes/Design Doc.md and an attachment diagram.png:
| Mode | Result Path |
|---|---|
root-folder (Default, mirror hierarchy on) |
attachments/Notes/Design Doc/diagram.png |
root-folder (Mirror hierarchy off) |
attachments/Design Doc/diagram.png |
same-dir |
Notes/Design Doc/diagram.png |
same-dir-suffix (Default .assets) |
Notes/Design Doc.assets/diagram.png |
main.js, manifest.json, and styles.css from Releases):npm install
npm run build
<YourVault>/.obsidian/plugins/note-attachment-folder/
main.js, manifest.json, and styles.css into that folder.| Setting | Description | Default |
|---|---|---|
| Language | Display language (English, 简体中文, 日本語, or Follow Obsidian). |
English |
| Folder location mode | Choose between root-folder, same-dir, or same-dir-suffix. |
root-folder |
| Root attachments folder | Base folder used by root-folder mode. |
attachments |
| Mirror note folder hierarchy | Preserve note subfolders under the root attachments folder. | true |
| Folder name suffix | Suffix appended to the note name in same-dir-suffix mode. |
.assets |
| Intercept pasted attachments | Capture clipboard images/files on paste. | true |
| Intercept dropped attachments | Capture OS files dropped into the editor. | true |
| Only handle images | Restrict capture and organize commands to images only. | false |
| Excluded extensions | Extensions to ignore (md, canvas, base are always excluded). |
md, canvas, base |
| Pasted image filename template | Supports {{timestamp}}, {{date}}, {{notename}}, {{random}}, {{index}}. |
{{timestamp}}_{{random}} |
| Always rename pasted images | Apply template even when pasted file already has a non-generic name. | false |
| Sync folder on note rename or move | Rename/move attachment folder alongside the note. | true |
| Rename images by naming template on sync or rename | Rename images inside the folder to match the filename template during sync/rename/organize. | false |
| Batch sync and repair note links | Update all .md and .canvas links silently in one batch with one summary notice. |
true |
| Trash attachment folder when note is deleted | Move unreferenced attachment folder to trash on note deletion. | true |
| Shared attachments during organize | Action (skip, copy, move) when another note also links the attachment. |
skip |
| Excluded folders | Vault-relative folder paths (one per line) ignored by the plugin. | (empty) |
| Show status notices | Show notices for sync, cleanup, and organize actions. | true |
| Restore default settings | Reset all plugin settings back to their default values (with confirmation). | — |
.md note): Scans all attachments referenced by the note and moves (or copies, depending on shared behavior) any scattered files into the note's configured attachment folder.npm install
npm run lint # Run ESLint (with eslint-plugin-obsidianmd)
npm run typecheck # Run TypeScript type check
npm test # Run Vitest unit & integration tests
npm run build # Typecheck and bundle production main.js
npm run dev # Watch mode during development