# Use the current note name in the attachment subfolder name

**URL:** <https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049>\
**Category:** Feature requests\
**Tags:** valuable\
**Created:** [January 27, 2021, 11:00am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049 "2021-01-27T11:00:31Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![barbarianbard](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@barbarianbard](https://forum.obsidian.md/u/barbarianbard)\
**Post date:** [May 30, 2020, 1:01pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/43 "2020-05-30T13:01:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![masonlr](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@masonlr](https://forum.obsidian.md/u/masonlr)\
**Post date:** [May 31, 2020, 9:12am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/44 "2020-05-31T09:12:30Z")

</div>

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

![image](https://forum.obsidian.md/uploads/default/original/1X/08c06420af84b09720cfedd8d06bcf090da9af15.png)

---

<div class="post-metadata">

**Author:** ![masonlr](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@masonlr](https://forum.obsidian.md/u/masonlr)\
**Post date:** [May 31, 2020, 9:14am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/45 "2020-05-31T09:14:32Z")

</div>

In `.obsidian/config`:

```auto
"attachmentFolderPath": "images",

```

---

<div class="post-metadata">

**Author:** ![nwarke](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@nwarke](https://forum.obsidian.md/u/nwarke)\
**Post date:** [June 8, 2020, 7:05am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/46 "2020-06-08T07:05:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bvautier](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@bvautier](https://forum.obsidian.md/u/bvautier)\
**Post date:** [June 10, 2020, 11:17am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/47 "2020-06-10T11:17:59Z")

</div>

## Use Case

I use [Greenshot](https://github.com/greenshot/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.

---

<div class="post-metadata">

**Author:** ![raivivek](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/r/8491ac/32.png) [@raivivek](https://forum.obsidian.md/u/raivivek)\
**Post date:** [June 12, 2020, 6:16pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/48 "2020-06-12T18:16:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![morphos](https://forum.obsidian.md/user_avatar/forum.obsidian.md/morphos/32/1311_2.png) [@morphos](https://forum.obsidian.md/u/morphos)\
**Post date:** [June 12, 2020, 6:35pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/49 "2020-06-12T18:35:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ajbrads](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@ajbrads](https://forum.obsidian.md/u/ajbrads)\
**Post date:** [June 16, 2020, 8:21pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/50 "2020-06-16T20:21:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![binaryanomaly](https://forum.obsidian.md/user_avatar/forum.obsidian.md/binaryanomaly/32/84054_2.png) [@binaryanomaly](https://forum.obsidian.md/u/binaryanomaly)\
**Post date:** [June 16, 2020, 9:17pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/51 "2020-06-16T21:17:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![subie](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/a4c791/32.png) [@subie](https://forum.obsidian.md/u/subie)\
**Post date:** [June 17, 2020, 9:24pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/52 "2020-06-17T21:24:40Z")

</div>

[ZimDesktopWiki](https://zim-wiki.org/screenshots.html) put attachments to a separate folder for each note. I checked it again and its very similar to Obsidian and more.

---

<div class="post-metadata">

**Author:** ![sol](https://forum.obsidian.md/user_avatar/forum.obsidian.md/sol/32/1648_2.png) [@sol](https://forum.obsidian.md/u/sol)\
**Post date:** [June 19, 2020, 4:47pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/53 "2020-06-19T16:47:28Z")

</div>

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:

```auto
/attachments/

```

Would be in the root, while:

```auto
attachments/ 

```

or

```auto
./attachments/

Would be relative.
```

---

<div class="post-metadata">

**Author:** ![tijno](https://forum.obsidian.md/user_avatar/forum.obsidian.md/tijno/32/1287_2.png) [@tijno](https://forum.obsidian.md/u/tijno)\
**Post date:** [June 20, 2020, 8:00am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/54 "2020-06-20T08:00:34Z")

</div>

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

> [@Set default attachment folder for "same folder as the file is in"](https://forum.obsidian.md/t/set-default-attachment-folder-for-same-folder-as-the-file-is-in/699/):
>
> 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 por…

---

<div class="post-metadata">

**Author:** ![ottovanluchene](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ottovanluchene/32/3268_2.png) [@ottovanluchene](https://forum.obsidian.md/u/ottovanluchene)\
**Post date:** [August 17, 2020, 11:09am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/55 "2020-08-17T11:09:02Z")

</div>

+1 for image folder based on filename - like Typora

---

<div class="post-metadata">

**Author:** ![Nebucatnetzer](https://forum.obsidian.md/user_avatar/forum.obsidian.md/nebucatnetzer/32/3918_2.png) [@Nebucatnetzer](https://forum.obsidian.md/u/Nebucatnetzer)\
**Post date:** [August 31, 2020, 6:41pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/56 "2020-08-31T18:41:48Z")

</div>

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](https://forum.obsidian.md/t/pasting-images/1566)

---

<div class="post-metadata">

**Author:** ![rigmarole](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rigmarole/32/29973_2.png) [@rigmarole](https://forum.obsidian.md/u/rigmarole)\
**Post date:** [August 31, 2020, 8:07pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/57 "2020-08-31T20:07:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nebucatnetzer](https://forum.obsidian.md/user_avatar/forum.obsidian.md/nebucatnetzer/32/3918_2.png) [@Nebucatnetzer](https://forum.obsidian.md/u/Nebucatnetzer)\
**Post date:** [August 31, 2020, 8:15pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/58 "2020-08-31T20:15:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rigmarole](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rigmarole/32/29973_2.png) [@rigmarole](https://forum.obsidian.md/u/rigmarole)\
**Post date:** [August 31, 2020, 8:19pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/59 "2020-08-31T20:19:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Caketray](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/c/c5a1d2/32.png) [@Caketray](https://forum.obsidian.md/u/Caketray)\
**Post date:** [September 1, 2020, 3:50am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/60 "2020-09-01T03:50:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rigmarole](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rigmarole/32/29973_2.png) [@rigmarole](https://forum.obsidian.md/u/rigmarole)\
**Post date:** [September 1, 2020, 4:56am UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/61 "2020-09-01T04:56:54Z")

</div>

🤯 Whoa.

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

---

<div class="post-metadata">

**Author:** ![brhubbar](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/43a26b/32.png) [@brhubbar](https://forum.obsidian.md/u/brhubbar)\
**Post date:** [September 5, 2020, 6:49pm UTC](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049/62 "2020-09-05T18:49:53Z")

</div>

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

[Previous page](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049.md?page=2)

[Next page](https://forum.obsidian.md/t/use-the-current-note-name-in-the-attachment-subfolder-name/12049.md?page=4)
