Sync Option for pictures: if local picture not found, use customized link to picture

Use case or problem

I have pictures in my vault that I embed in my files, but I do not sync them to save space on my non-desktop devices Of course that means that I cannot see the pictures on my other devices.

However, I do have copies of those pictures on my server, with the same name.
Currently I embed the local file and next to it I also include a link to the the server’s version as an external link.

![[2020-08-01 Day 3 Amsterdam all bridges meet here.jpg]]
![Front Cover|300](<https://mywebpage/2020-08-01 Day 3 Amsterdam all bridges meet here.jpg>)

Proposed solution

I could avoid having to insert the link to the picture as well as the embedded picture if sync had an option that said: “link to use to access pictures when local not found: _______”
where I would type: ![image|300](<https://mywebpage/$imagename>)

Obsidian would then automatically replace embedded pictures with the server’s pictures when the local picture wasn’t found, and they could be viewed on all devices.

Why not just use the server address all the time?

A few reasons

  1. Some of us on desktops still like to organize related files together in the same folder.
    2020-08-01 Day 3
    2020-08-01 Day 3 Amsterdam all bridges meet here.jpg
    2020-08-01 Day 3 Amsterdam google map of the day.pdf
    2020-08-01 due - annual payment to WWMagazine.txt

  2. Some of us still have unreliable internet service, and/or very slow service, too spotty to rely on all the time

1 Like

Exploring workarounds: HTML has a way to specify fallback images: the picture element. The downside of using it here would be losing the benefits of the wiki-style embed, plus you have to specify the server image every time. (But you could reduce the friction with a template, or maybe do something fancier with the Templater plugin.)

(I experimented with using an embed as the link text to an embed, and using a Markdown embed inside the brackets of another Markdown embed, but no luck.)