I wrote most of what I wanted to write up about this here:
I expect that link to be valid at all times, but I still decided to copy and paste those lines here:
You can use the Wikilink reference, but it is superior to use markdown links for referencing your images so other apps (like MWeb on iOS) and non-Obsidian or non-Obsidian-Publish programs and web apps can interpret them and make use of them.
I use Wikilinks for internal links and use markdown links for referencing images.
They look like this:
- I try to remain true to the filename when naming and referencing images, but usually I remove spaces between strings; a file named
File name is suchwill have images named
You can make use of the Paste Image Rename plugin for keeping your image names identical with filenames.
But that will reference images with Wikilinks.
What you can do is use regex to exchange those with markdown links.
You can use a plugin (Regex Pipeline or better, Apply Patterns) to exchange links within the file or you can use a text editor like VSCode, Notepad++, Sublime Text, etc. to make changes for your whole vault. (Make a backup first, just in case you make a mistake somewhere.)
In my case (I have an ‘assets’ attachment folder under each of my folders, you may not need that):
If you have spaces between strings in image names, you must add
- On making these regex changes, see another post of mine (scroll down to where the Apply Patterns section starts):
Clean up pasted text from PDF's and other sources – Removing Hard Line Breaks
On another sort of future-proofing, see: