Use the current note name in the attachment subfolder name

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 SVN.md
→ Whatever
→ Attachments
  → some svn merge Conflict.md

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 _index.md 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.

2 Likes

+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.

Context

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.
4 Likes

+1

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

5 Likes

+1
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.

6 Likes

Typora has image preferences.

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

  1. when insert, provide these 3 options

image

  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

34 Likes

Came here to post a similar request so shall add mine as a comment: Can we also have a default save location for assets in the settings like we do with the daily notes and new notes.

2 Likes

@barbarianbard are you using “Set as attachment folder”?

image

4 Likes

In .obsidian/config:

"attachmentFolderPath": "images",

I like how typora keeps assets related to a note in (linked by name) a separate folder.
In note system where you move notes between folders, this helps out a lot in migration.

For e.g. - I put daily notes in Inbox folder then at EOD sort them in respective folders. Although obsidian doesn’t mind it, moving attachments takes care of OCD tick.
In rare case if I delete a note, it will also let me know if any there any lingering attachments left.

4 Likes

Use Case

I use Greenshot a lot when writing articles and copy images to the clipboard before pasting them into the documents I am working on.

Current behavior

  • A generic image name is automatically assigned to the image (With no easy way of renaming the file name afterwards.)
  • Only one asset folder location can be specified

I typically have many images in my documents and putting them all in the one folder gets really messy really quickly. I basically need one image folder per document.

Improvement suggestions

  1. When pasting an image, show the image in a pop-up window and allow the user to name the image and choose the folder it should be stored in.
  2. Allow each markdown document to specify the folder path the images should be saved into, in the YAML frontmatter. (Should be able to work with relative paths to the document location)
  3. A combination of the 2 previous points. (but would be very happy if only point 2 was implemented)

Aim

A really seamless way of quickly inserting images into documents and automatically saving them in the correct folder.

Allow the user to name the file as it is pasted into the document or being able to easily rename the file after it is pasted.

15 Likes

Thanks for bringing this up. I agree that this would be very useful. Even having a date-prefix to the pasted image would be more useful than “Pasted image”.

7 Likes

Agree. Good sugestion. I am acostumated to use many images in my notes and so far Obsidian has not reached the sweet spot on this.

4 Likes

Hi all, I would find it very useful to have an attachment folder per topic in a particular vault. For example Vault 1 has four separate topic folders. I would like to see an attachment folder for each of the four separate topics – they are different historical eras.
Trust this makes sense and meets wil approval, but if it is not possible, this is still an amazing software package. Thank you very much.
Adrian

2 Likes

Agree, it’s unsolved problem. Not sure if there’s one-size-fits-all approach.

Providing more configurable options would be a positive development though. Being able to define default folders depending on where in the folder structure one is, would be a welcome improvement.

2 Likes

ZimDesktopWiki put attachments to a separate folder for each note. I checked it again and its very similar to Obsidian and more.

3 Likes

In terms of UX, something that could be done is just keep the same input and allow for the user to put a relative path or an absolute path.

For example:

/attachments/

Would be in the root, while:

attachments/ 

or

./attachments/

Would be relative.
3 Likes

yep relative folders would work for me as well

especially if ./ is allowed - eg save image in same path as note.

Heres a related post with some
more suggestions to follow typoras approach as well

1 Like

+1 for image folder based on filename - like Typora

3 Likes