Use the current note name in the attachment subfolder name

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

Currently the pasted images get names like ā€œPasted image.pngā€.
It would be nice if they could maybe have a name like ā€œ2020083101_server.pngā€ or ā€œserver_2020083101.pngā€.
The second one would make it easier to see to which note they belong.
There is a similar thread here: Pasting images

2 Likes

I agree, having a lot of ā€œPastedā€ filenames isnā€™t very handy when attempting to link manually, or find images in the filesystem later.

It would also be nice if you could simply rename the attachments directly from Obsidian, updating the filename, as well as any links.

Edit, I am going to merge these threads, since the feature request is very similar. I suggest adding your vote/discussion to existing threads when possible, rather than starting a new one.

2 Likes

Thanks will do so next time.
I just thought it would be better to open a new feature request because it felt like two different features (file names and the interface for pasting).

Yeah, this existing feature request covers a different range of suggestions. Some of which I disagree with. (I wouldnā€™t want a pop-up, for example.) But the underlying concern is that pasting images could be improved, and I think your point adds well to this.

2 Likes

I believe you can in fact rename directly from Obsidian - if you put the cursor on the image link and hit alt+enter it will open in a page as if itā€™s an Obsidian note, and you can change the title and have all links update just like you can with markdown.
Itā€™s more context-switching than it should be, Iā€™d prefer them automatically named based on the ā€˜parentā€™ note, but itā€™s been okay for me for now

5 Likes

:exploding_head: Whoa.

Thanks! I had completely missed that. That is a good enough workaround for me for the time being.

A simple keyboard shortcut like alt-enter that allows renaming without changing notes (similar to the linking tooltip) :+1:

1 Like