Keeping image/attahcment paths intact when moving notes?

Hi,

When I drag and drop of a note to another folder, the path to the images are lost, therefor I am always missing images after reorganizations. I use “assets” folder under each folder as my attachment repo since this is more organizational for me than a global asset repo.

I am not sure if one of the extensions is mingling or something else.

I have an attachment in the main folder like this

![[pages/assets/d969881313379530a68aef1963d9d867_MD5.jpg]]

I move the note to “pages/notes”. After that the attachment image is missing in the note since “page” does not exists under the “notes” being the subfolder. So the images need to be moved and referenced from “assets” in the “notes” folder

Is there a way to automatically fix these image links?

… might be of use.

Thanks. Does Obsidian take care of moving assets/attachments normally?

I use the following settings for all my Obsidian vaults …

Under Files and Links:

  1. “Default location for new notes” - “Same folder as current file”.
  2. “New Link Format” - “Relative path to file”.
  3. “Use [[Wikilinks]]” - “off” … yet I still get the advantages of [[]]
  4. Detect all file extensions - enabled
  5. “Default location for new attachments” - “In subfolder under current folder”.
  6. “Subfolder name” - value: “attachments”.

"… Does Obsidian take care of moving assets/attachments normally?¨

I don’t know as I use the above settings and always try & move everything manually. I haven’t had a problem but I bookmarked the plugin I posted just in case I ever needed it.

I asked my favorite AI: Bing chat @ https://web.skype.com/

[Note to moderators: If posting an AI response is against the rules, please let me know & I’ll remove it]

My PROMPT:
obsidian how are attachments handled when moving notes

BING’s response:
Obsidian is a powerful note-taking app that allows you to attach various types of files to your notes, such as PDFs, images, audio, video, and more. However, you may wonder how Obsidian handles these attachments when you move your notes to different folders or locations. Here are some points to consider:

• Obsidian has a setting that lets you choose how to store your attachments. You can find it in Settings > Files & Links > Default location for new attachments. There are four options to choose from Attachments: - Obsidian Help

Same folder as current file - Search adds the attachment to the same folder as the note you added it to.

In subfolder under current folder - Search adds attachments to a specified folder next to the note you added the attachment to. If it doesn’t exist, Obsidian creates it when you add an attachment.

In the vault root - Search adds attachments to the root folder of your vault, regardless of where you added the attachment from.

In subfolder under vault root - Search adds attachments to a specified folder under the root folder of your vault. If it doesn’t exist, Obsidian creates it when you add an attachment.

• Obsidian uses relative links to link your attachments to your notes. This means that the link will point to the attachment based on its location relative to the note. For example, if you have a note called my-note.md in a folder called notes, and you attach an image called my-image.jpg to it, the link will look like this:

![[my-image.jpg]]

This link will work as long as the image is in the same folder as the note. However, if you move the note or the image to a different folder, the link will break, because the relative path will change. To fix this, you will need to update the link to reflect the new location of the attachment. For example, if you move the note to a folder called new-notes, and the image to a folder called images, the link will need to be changed to:

![[…/images/my-image.jpg]]

The …/ means to go up one level in the folder hierarchy. You can use multiple …/ to go up multiple levels, or use / to go down to a subfolder. Alternatively, you can use absolute links to link your attachments to your notes. Absolute links will point to the attachment based on its location relative to the vault root. For example, if your vault root is called my-vault, the absolute link for the image will look like this:

![[/images/my-image.jpg]]

This link will work regardless of where you move the note or the image, as long as they are still in the same vault. To use absolute links, you will need to enable the setting “Use [[Wikilinks]]” in Settings > Files & Links > Link format. You can also use the command palette (Ctrl+P) to convert links between relative and absolute formats.

• Obsidian does not automatically move your attachments when you move your notes. This means that if you move a note to a different folder or location, the attachments will stay in their original folder, unless you move them manually. This can cause some issues, such as cluttering your vault with unused attachments, or losing track of where your attachments are. To avoid this, you can use some strategies, such as How I keep my Obsidian vault super organized with the “Auto Note Mover” plugin | by Zachary Shirmohammadli | Medium Practically Paperless with Obsidian, Episode 18: How I Organize My Notes – Jamie Todd Rubin Medium

• Organizing your attachments in a separate folder or subfolder, and using absolute links to link them to your notes. This way, you can easily find and manage your attachments, and you don’t have to worry about broken links when you move your notes.

• Using a plugin like “Auto Note Mover” to automatically move your notes and attachments to the appropriate folders based on the tags, headings, or frontmatter of your notes. This way, you can keep your vault super organized, and you don’t have to manually move your notes and attachments.

• Deleting or archiving any attachments that you no longer need or use, to free up space and reduce clutter in your vault. You can use a plugin like “Find unlinked files” to find any attachments that are not linked to any notes, and decide whether to keep them or not.

I hope this answer gives you some insight into how Obsidian handles attachments when moving notes, and how you can manage your attachments more effectively. If you have any further questions, please feel free to ask.

END OF BING’s response

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.