Smart Attachments
unlistedby moringchen
Automatically organize attachments to a resources folder with the same relative structure as your markdown files.
Updated 2mo agoMIT
Smart Attachments for Obsidian
Automatically organize your attachments into a structured resources folder that mirrors your vault's directory structure.

Features
- Automatic Organization: Files are organized by type (images, audio, videos, documents, etc.)
- Mirrored Structure: Attachments follow the same relative path as the markdown file they belong to
- Duplicate Handling: Automatically renames duplicates (e.g.,
image.png→image-1.png) - Flexible Linking: Choose between WikiLinks or standard Markdown link formats
- External Resources: Attachments are stored outside your vault (as sibling to vault root)
How It Works
When you paste or drop a file into a markdown note:
Your Vault:
├── notes/
│ └── projects/
│ └── readme.md
└── .obsidian/
Resources Folder (created as sibling to vault):
resources/
└── images/
└── notes/
└── projects/
└── pasted-image.png
The resulting markdown link:
![[resources/images/notes/projects/pasted-image.png]]
Installation
- Download the latest release
- Extract to your vault's
.obsidian/plugins/folder - Enable "Smart Attachments" in Obsidian's Community Plugins settings
Configuration
Open Settings → Smart Attachments to customize:
- Resource folder name: Change the name of the resources folder (default:
resources) - Link format: Choose between WikiLinks or Markdown format
- Auto-rename duplicates: Toggle automatic renaming of duplicate files
Supported File Types
The plugin automatically categorizes files into subfolders:
| Type | Extensions |
|---|---|
| Images | jpg, jpeg, png, gif, webp, svg, bmp, ico |
| Audio | mp3, wav, ogg, flac, m4a |
| Videos | mp4, webm, mov, avi, mkv |
| Documents | pdf, doc, docx, xls, xlsx, ppt, pptx |
| Archives | zip, rar, 7z, tar, gz |
| Code | js, ts, py, java, cpp, c, go, rs, html, css, json, xml, yaml, yml, sql, sh, bat, ps1 |
| Other | All other files go to files/ |
Development
# Install dependencies
npm install
# Build for development
npm run dev
# Build for production
npm run build
License
MIT
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.