by hutnerr
Define rules for more advanced and custom placement of newly created attachments. Useful for people who want to organize their assets based on where they are used or added into the vault.
This project is completed and likely will not receive any new features, only maintenance updates.
Overview
An Obsidian plugin that makes attachment placement more flexible and context-aware.
Instead of forcing all new attachments into a single hardcoded folder, it lets you define where they should go based on the file or folder you're currently working in. It's likely most useful for people who paste in a lot of images and want them better organized.
Setup: Install the plugin from Settings › Community plugins in Obsidian, or from the Plugin Page.
Links:
View more about the project on its showcase page.
Usage
To get started, open the plugin settings and define some placement rules. Rules can target individual .md files for per-note precision, or entire folders for broader coverage. Once rules are set, the plugin handles new attachments as they're created.
When a new attachment is created:
- The plugin checks if the active file itself has a placement rule.
- If not, it checks the file's parent folder.
- If not, it checks the parent folder's parent, and so on.
- The attachment is placed according to the first matching rule found.
If no rule is found, the plugin uses the fallback location defined in settings.
Example
Given the following structure:
/
├── attachments/
│ ├── school/
│ ├── journal/
│ └── videogames/
├── journal/
├── league-of-legends/
├── dragon-age-origins/
└── school/
└── math/
├── factoring.md
└── addition.md
If we are working within addition.md, we first check if there is a rule for addition.md itself. If not, we check its parent folder (math/), then school/, continuing upward until a rule is found or the root is reached.
These are what the placement rules for that structure might look like:
For another example, check out the Help Page.
Support
If you found this project helpful or enjoyable, and want to support future work, you can buy me a coffee on Ko-fi
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.