Set default attachment folder for "same folder as the file is in"

Use case: let’s say I’d like each folder to act like a standalone vault:

  • /topic1 where attachments automatically go to /topic1/attachments
  • /topic2 where attachments automatically go to /topic2/attachments

Then each folder is essentially a portable vault. The downside to having a single global /attachments folder is that all attachments are co-mingled amongst all topics. I tend to paste in lots of screenshots, so a folder full of ‘Pasted image.png’ files makes it very difficult to maintain portability.

Would love a setting that goes along with “File: New note default location: Same folder as the file is in” that is essentially “New attachment default location”

37 Likes

Adding my +1 to this… having a single folder for attachments is hard to deal with. I take a lot of screenshots that I then paste into Obsidian. Then I have to go to my attachments folder and rename the “Pasted Image” to something meaningful. Right now I’m renaming them to something like “work-keda-install-01” because it’s in a Work/Keda/Install set of subfolders.

4 Likes

I would really like a folder per note option… i.e.

2020-05-04 Today’s Note.md

And if I add an attachment:

2020-05-04 Today’s Note.md
Attachments/2020-05-04 Today’s Note/attach1.jpg

(where “Attachments” could be defined)

That way you could have multiple attachment files in the vault with the same name, and they are associated with the file. This allows for better (to me) work from outside of Obsidian. Kind of a TextBundle type format.

7 Likes

+1 from me too on this one.

I tried ./ and ./assets/ as the attachment location but that didn’t do the trick. Was hoping this would save pastes images in the folder at same level as the document I am posting it to.

I guess challenge is what the logic is for finding the image when displaying / previewing the note. Maybe it can offer support for path1:path2:path3 style format, so it looks first and always saved in path1 but if not found looks for path2 then path3.

Related - an option to easily rename image after pasting/dragging would be awesome.

So I can rename the CleanShot 2020-06-14 at [email protected] to relevant-name.png

The workaround at the moment seems to be: paste > option left > option enter > click title > enter new name + enter > cmd option left to go back to note

3 Likes

I’d like this too.

To integrate a maximum number of use-cases, I suggest using Typora’s way :
Attachment folder path can be set to the current note path, a custom fixed path, or a relative path containing or not the note filename.
image
image

Maybe this would complicate things when changing the note filename, but it’s really important to me to keep a neat filetree.

12 Likes

I like using the hidden assets folder per note. This allows not only keeping attachments per note separate but also could pave way in the future for another feature implementation: side car files. Every note could have some settings like remembering folded blocks, cursor or scroll position, etc. stored in a sidecar file which would make the app so much more powerful!

13 Likes

+1 for this. This is something that I was immediately trying to figure out how to do. I want to make sure that my files aren’t all messy, since I have a tendency to attach a bunch of things to my documents.

3 Likes

+1
It’s essential feature for portability. I can’t imagine having all attachments in one folder. There is no chance for any attachments management if all of them are in the same folder.

4 Likes

I think it would be great just to be able to define for you self what you want to do. The same folder, a folder in the same directory, or the vault folder. I think considering the vast diversity of the ways people organize their files and different schemas that other editors use, the option for user to define what they want is essential.

3 Likes

+1 for the typora-solution

5 Likes

+1 . Just realized I have a ton of images but they’re all in the root directory. When transferring files over or looking at the MD files, they’re incompatible since I tend to use the following format:

Books/Fourhour/
Books/Fourhour/Notes.md
Books/Fourhour/Screenshot1.png

I can’t possibly think that storing every image in the root vault or even 1 directory with hundreds of notes could not end up being a clusterf…

I prefer the Typora method. I still realize this program is still in its infancy.

1 Like

This one would definitely be on the top of my wishlist. Allowing the users to have a separate attachment folder for a specific file/folder would increase the tidiness of the vault especially as the vault increases in size. It would also benefit the process of exporting notes and organization, e.g. file paths like

![Scanned Document](./meeting-notes-attachments/Scanned-2020-09-05.png)

for file-wise attachment folders or

![Scanned Document](./attachments/Scanned-2020-09-05.png)

for folder-wise folders. Either way, it should be best to let users pick as @amirography pointed out.

I think all the systems have their complications.
Per folder means attachments scattered everywhere and needing a tracking method when folders are switched around - they’re not immutable.

Per vault means there will be potential problems when using nested vaults, if you add attachments while you’re in a higher level vault.

I’d just point out that, if you open your folders as vaults, then you can add attachments into an attachment folder for that vault.

1 Like

The latest insider update seems to be already fiddling with the attachments syntax for resizing of images. I’m wondering if this is an issue that can be tackled while the team is working on this? Especially with the push for Publish, seems to make sense to work on this feature.

I strongly support providing options that allow storing attachments either in the same folder as their parent note (that they were dragged to) or optionally a subdirectory of that folder. Having all attachments in one location is unmanageable for many reasons, as well as being non-portable.

1 Like

What if the same picture is attached in two notes in the same folder, but you decide to move one of the notes to another folder, what happen whit the attach?

@henrique I think the “right” thing to do is offer to update the link in the note that moved to point to the image in the original folder.

e.g. if it was

root
 | \______ foo (dir)
 |          |____note1.md
 bar (dir)  |____note2.md
            |____img1.png 

before, in both note1 and note2, the referenced image could be as ![[img1.png]]

after moving note2.md to the bar folder, the link should be
[[../foo/img1.png]]

Another option would be a prompt that says “this note references local files that are shared by other notes. Do you want to duplicate the linked files, or update the references so they point to their original location?”

3 Likes

@luckman212 That can solve the problem.

I think it makes total sense to have more options for the folder path. But the perfect companion feature to that would be the ability to edit the filename of the embed/attachment on the spot, right there while writing in edit mode itself (and maybe inherit the name of the file with a numerical suffix as the default option).

Would something like this be possible? In fact, with that feature, I’d not care as much about not having folder options. Because even if its organized in a single Images folder then-- it’s still well-organized.

2 Likes

I have not officially changed over to Obsidian. I am still using KeepNote. This makes me wonder if I would have to go back and do a lot of cleanup if they changed it to a per folder workflow. I know if you move a note all links get updated. I am hoping attachments would work the same. I am hesitant to commit and start using it yet. I do agree that a per folder or an option as listed above is better long term.

ce