Use the current note name in the attachment subfolder name

I’ve downloaded the code and extract to plugin folder of obsidian. However, I could not enable it to be activated. Could you please suggest how should I enable the plugin? By the way, the Obsidian version is 0.12.19


@Ellanxis @greatqs
This plugin is still under development and I didn’t implement setting tab in 0.0.2.
I will fix some bugs and release a “stable” version(0.0.3) today. Also I will update with more detail.


@RainCat unfortunately, I downloaded v0.03 and followed your README to copy main.ts and monifest.json to plugin folder. Still, I can see the plugin in Obsidian but I cannot activate it.

You should download main.js, manifest.json in the latest release.
Obsidian plugin is wriitten in typescript and main.ts is the souce code and you should build it and the output is main.js.

1 Like

Just simply go to latest release page. and download main.js and manifest.json into your plugin subfolder.

1 Like

Thanks a lot @RainCat for your plugin that what I wanted to have in Obsidian core option. :+1:

I miss somme functionnality but I hope like moving the folder when the note is moved or audio recording.

For the attachment folder starting with a point, like .attachement, I understand that’s a limitation from Obsidian and I hope there will be a solution from Obsidian team in the next releases. :crossed_fingers:

1 Like

@RainCat you are a living God! This is one of my greatest annoyances about Obsidian and one of the reasons I keep leaving only to come back to the same issues!


@RainCat I can’t explain how much I appreciate your work. A must-have life saver for the Obsidian community if not too exaggerated. I’ve just started using Obsidian as a Zettelkasten tool recently and always wonder how to keep the note portability when it comes to sharing or moving a note with all its attachments as a single unit, especially when you put all your notes in a single folder and all attachments in its subfolder called “attachments”, which was how I set up my Zettelkasten system.

Now with your plugin, the problem is solved and I can start taking my notes without needing to worry about this anymore. I’m glad that I found your plugin in the early stage so I can fix current attachment folders/images easily to fit the assigned folder structure. Imagine someone who has using Obsidian for years with thousands of images to fix…

Again thank you so much for this amazing plugin.

Best regards,


Use case or problem

The problem is that a single attachment folder is just too cluttered and can be simply improved.

I use Obsidian as note taking and often have a lot of nested notes. There are a couple of options for my attachments: 1) Having attachments on the notes (or sub directory of them) which has a lot of noise on the side bar which I don’t like. 2) Specifying an attachment folder, but having +100 organized, nested notes, I would like to have an organized attachments in a dedicated attachment folder

It would be great to have an option to organize attachments as nested folder with their path being the same as their md doc.

Proposed solution

A new option to Default location for new attachments of “In the folder specified below, with the same hierarchy (relative path) as the note itself”

Let me explain:

If I have specified myAttachments folder to be my target folder, if I’m writing a note in work/stuff/newNotes/ then inserting an image would just put it automatically in the myAttachments/work/stuff/newNotes/note1/untitled 0 .png . This way not only my notes are organized, also my attachments are organized too.


This is a great idea and I don’t think I’ve ever seen anyone try this.

(This also means that when we move notes, the attachments should move in parallel fashion. Right now, even if you choose the in subfolder under current folder option, moving a note will not move its attachments. That should be fixed either way.)

This innovation could set a new precedent, as it solves a lot of problems at once.


I wasn’t aware that the subfolder option doesn’t move the attachments when the notes move. So yet another reason why a simple hierarchy for attachments makes sense (you just move around attachments in the attachments folders). Honestly, I don’t find the sub folder option useful at all since my side bar (left panel) just get too many useless folders which I don’t ever use/open

Seems like you are assuming a 1:1 relationship between notes and attachments. That isn’t always the case. You could have a single image for example, that is attached to many different notes.

For example, if you have many notes for baking bread, there could be one set of images that show the process of shaping and proofing of a dough, but it could be attached to 15 different recipes.


@egauthier Interesting usecase. I guess it comes to how common is each scenario. In my personal experience, I have not encountered that scenario, and If I ever need such re-use of the same image I would just insert it again and don’t think about of “where did I put that image last time”.

1 Like

Use case or problem

We currently have the option to automatically move inserted attachments into a “… subfolder under the current folder”.

I think it would be nice to turn in into something like “in folder relative to current folder” so you could for example use “…/attachments”.

Example Directory:

Project A
→ Member Profiles
→ Lessons Learned
  → Dont Use
→ Whatever
→ Attachments
  → some svn merge

You can infact enter a relative path in the current options. It will create the folder, when inserting some kind of attachment into the note, but the attachment will be saved into the vault root.

If you try again you will get a message in the console telling you that the folder already exists.

Proposed solution

Add support for relative paths in both relative directions.

Current workaround (optional)

Probably with the plugin Custom Attachment Location

One variation of this theme would be to have strictly one note per directory and all attachments in the same directory. In this case, a directory would be regarded as a note iff it would contain an file (as an example). This approach would be my preference because moving and renaming notes and attachments would be trivial also outside of the app.


+1 Here.

I’m reaching out regarding the same issue many Obsidian users might be encountering - the need for better future-proofing of our notes as a combination of text and assets.

This critical matter doesn’t get the visibility it deserves due to the way new posts are swiftly deleted or merged and spread across several topics such as textbundle support, attachement folder name, and foldernotes.


Obsidian’s robustness shines, but when it comes to attachment management, things get chaotic and that hinders the efficiency of my vault.

Use case or problem

  1. When capturing web pages, either I get only markdown text without images, or I add images to the vault where they remain loosely connected to my note and stored in a messy asset folder.
  2. Scanned paper invoices along with notes necessitate manual handling of images when notes are relocated.
  3. In cases like a note containing personal photos, images remain detached, making potential migrations cumbersome.

Notes in Obsidian are often a blend of text and images, losing significant context without their assets. The markdown-only approach future-proofs the text but leaves the whole note (text + assets) vulnerable.

Current workaround

  1. FolderNote - I place assets within folders, but this involves a lot of manual work. Also, it results in a mixed bag of markdown notes and folders, making things cluttered and hard to manage. In the screenshot below, notes with attachements are in red, those without are in blue.
    Screenshot 2023-07-05 at 10.04.11
  2. Bear App - I use a Python script to scan my vault, detect attachment errors, create a TextBundle backup, and import it to Bear for integrity checks. I am also waiting for Bear 2, which may better serve my needs.

Proposed solution

My focus in Obsidian is handling notes, not their attachments. Attachments should follow a note seamlessly when moved or exported.

By merely dragging and dropping or scanning an asset, it should integrate into the note automatically. This transforms the Obsidian vault into a hub of standalone notes, eliminating the separate asset directory.

Imagine the Obsidian interface retaining its familiarity, yet with a streamlined process for asset embedding beneath, enhancing its organization and adaptability.

Related feature topics

  1. Scan Note and Move Attachments
  2. Attachment Folder Compatibility
  3. Delete/Move Note with Attachments
  4. Better Attachment Manager
  5. TextBundle Support
  6. Set Default Attachment Folder
  7. Better attachment manager
  8. Scan note and move all the notes attachements to the "Default location for new links and attachments"
  9. Automatic image and attachement management
  10. Can moving between folders also move the attachments?
  11. Attachment folder like {{filename}}_attachments for Noteplan 3 compatibility - #4
  12. Auto-create attachment folder and allow dots in folder name (.media for instance)
  13. Consistent moving of attachments when moving notes to different folder
  14. Hide attachments
  15. Link attachment to page it describes
  16. Create subfolders for attachments based on custom pattern (e.g. note file name)
  17. Remove unused attachments
  18. Attachments creating unwanted new files?
  19. Make Attachment folder persistent to renaming
  20. Etc.


Moving the note should move the subfolder, too

Renaming the note should rename the subfolder

Any resources linked / embedded that are not in the subfolder should stay in the note unchanged when renaming


Really need this before I am comfortable migrating everything to Obsidian.
A typora style or @mairas solution would be awesome.

1 Like

I came here with the same request. A single attachments folder per vault is definitely better than them all being in root. But my ideal would be to be able to specify an attachment sub-folder per high-level folder. A new image would then save to the “nearest” attachment folder on its path.


Typora has image preferences.

Given that that’s a lot, I recommend prioritizing the following:

  1. when insert, provide these 3 options


  1. and then just offer these 2 options after the when insert
  • Apply above rules to local images
  • Apply above rules to online images

I love typora. Hope to see obsidian follow their well thought out design when possible