Plugin: Attachment Steward - keeps your attachments organized into folders you define

Disclaimer

Is this plugin open source? Yes
Is this plugin completely free? Yes
Is this plugin vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory: [Link](https://community.obsidian.md/plugins/attachment-steward)


I got tired of my vault turning into a mess of images and files scattered everywhere. I tried a few attachment-organizing plugins, but ran into a couple of real problems:

- If a note came in with attachments already attached (like exporting from Apple Notes or Evernote), the plugin just ignored them - it only reacted when I edited the note myself.

- Running the same organizing rule twice would mess up the filenames, stacking a date or prefix on top of itself over and over.

So I built Attachment Steward to fix that:

- New attachments get organized automatically the moment they show up, even in bulk imports

- It remembers each file’s original name, so running the rules again and again never messes things up

- When it moves a file, it goes through Obsidian’s own link-rewriting, so every note (or canvas) that links to that file gets updated too - not just the one you happened to edit

There’s also a lot to configure if you want it: where attachments go (vault root, a fixed folder, next to the note, or wherever Obsidian’s own setting already points), your own folder and filename templates with variables like date, note name, or a hash, different rules for specific file extensions (e.g. keep PDFs separate from images), and folders you want it to never touch at all. Plus a few maintenance commands - reapply your rules to everything, pull in attachments that were never organized, or find files nothing links to anymore.

Would love any feedback, especially if you hit an edge case I haven’t run into.

I tried using this, but it always says “No unmanaged attachments found” when I use the “adopt” option on a note, and then “No managed attachments found” if I use the “reapply” option on a note.

I have my files linked in a frontmatter property, and was hoping to use this plugin to rename them to match the ${notename}. Does this only “scan” inline files, or am I not understanding how to use it?

Thank you!

You got it all right. It’s just that I had no idea what a frontmatter property was. I looked into it today, and I think it’s a cool feature. It might come in handy when developing other plugins.
As you requested, please check out version 0.3.0. I just released it today.

After updating, enable “Scan frontmatter properties for attachment links” in the plugin settings, and try running the commands you’ve already run. Everything should work.
Just make sure the directory containing the files you’re linking to isn’t listed in the “exclusions.”

YES this now appears to do exactly what I wanted!! :grin: Thank you so much for the quick reply and fix!

How would you suggest setting it up so that: images of any kind (jpeg, jpg, png, etc.) go into one folder, and PDFs go into another?

I can only see how to make something the “default” (under the Location setting) and then have the Extension Overrides go into a folder within that default folder. I want some file types to go into an Images folder, and some file types to go into an Attachments folder.

Good question!
You’ve got it exactly right.
It turns out I hadn’t anticipated the use of regex for the Extension override. This has now been fixed in version 0.4.0. Now you can specify jpe?g|png|gif|webp for all images, and that will make things much easier.

Now you can set the main rule however you like and add two more rules; here’s an example

Again – thank you for the quick fix, and for understanding my use-case!

I have one more question…more of a suggestion…
What if I have TWO image properties in the same note? So, like for an eyeshadow – I have an image linked for the individual Color, and then I have an image linked for the front of the Package, so I know which box it is in.
Is there a way to choose which image gets renamed? I want the Color renamed, but not the Package (because the same Package image is shared across many different notes, so that image has to have a separate name that does not get changed).

I know that’s not really a “bug” or a misundestanding. Just a thought I am throwing out there.

1 Like

Thank you for the coffee.

Regarding your question:

Here’s an idea: try creating a “shared” directory for these images. The directory can contain many other subdirectories for convenience.
Exclude the “shared” directory

Feel free to add images (files) from this directory wherever you want and as many as you want.

If that doesn’t help, please describe the idea in more detail, preferably with examples of how you envision it.
I’ll take a look when I have some free time.

I think this solution will work, especially since it is literally only ONE type of note that I have this issue with!!

1 Like