How to create external link with relative path instead of absolute path?

What I’m trying to do

I need to link files outside my vault but I would like to use relative path and not absolute path, this way if I move the folder that contains my vault (folder1 in example) all my links will still work.

To be more clear, this is an example directory:

C:\Users
└─ MyUsername
      └─ Desktop  
            └─ Folder1
                  ├─ Obsibian_vault_folder
                  └─ Image.jpg

In my note I want to create an external link and I usually hold ctrl and drag the file but the resulting link is an absolute link as following: [Image.jpeg](file:///C:%5CUsers%5CMyUsername%5CDesktop%5CFolder1%5CImage.jpg)

Since I would like in future to be able to move folder1 without broking the links, I would like to know if there is a way to make the link relative, something like [Image.jpeg](file:///…/Image.jpg)

Thank you :slight_smile:

Did you find a solution?

Obsidian just strips off the leading …/

If you absolutely need to move folders, you can:

  • use symbolic links (better as the files are already outside the vault)
  • do mass search and replace for the absolute path (messy with syncing many files afterwards but not a biggie)
2 Likes

Thank you for the great answer :slight_smile:

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