A way to generate a universal image URL that works between Mac and iOS (DropBox, iCloud, other?) I'm looking for a way to make all my markdown file universal that is work on iOS, Mac, even Linux/Window/Android. 

I want to have a single folder where I stick all my images and then point to that folder from whatever OS/device I'm using. For example

~/img/image.png


would be readable in the .md file from anywhere.

Does anything like that exist? Can I use iCloud or Dropbox for that?  Are there any other solutions people may suggest?
I want to have a single folder where I stick all my images and then point to that folder from whatever OS/device I'm using [and] would be readable in the .md file from anywhere.


What you're looking for is a cloud based service.  There are several image specific services that can do this for you:


Flickr/SmugMug
500px
Imgur (used by Stack Exchange)


However, you're not limited to a service that only supports images.  iCloud (pending), DropBox, OneDrive, etc. all the ability to do what you want.  For instance, using the following markdown code, I can insert the following image hosted on my OneDrive account:

Code:    
&lt;img src="https://kl8ofa.bn.files.1drv.com/y4mW66FhA4IBlnLBez4t70-rBq51PBEoTI6USX6Kxn46GjR-xfXtWz3knMJm6MbqIOwqutlneyiaDLQvj_upQgrhVjIsjQFjmHEb_DPIsIwQtzE1KD52cMyrRkZuSFQw-vJdTSkIfQfcU3IOPTj0VxC_o_Sbew8NK7I9RtUBAmfCk1NXqURe0BIVkt2-NeHQhadleH2VG0HN8e5PV3BggllSA?width=2048&amp;height=2048&amp;cropmode=none" width="400"


 

You can even create a download link to the original wallpaper file by using supported HTML within your markdown:

Code:
&lt;a href="https://1drv.ms/u/s!AmW50NkbWLGik54_9VmMgoY8pczbzg"&gt;original wallpaper file&lt;/a&gt;


Now, understand, that link must be generated by the service unless you plan to host the images yourself (way too much work!).  



More Examples:

Dropbox:

Code to Embed image:
&lt;img src="https://www.dropbox.com/s/h29iren2akr83ii/FreeBSD%20Wallpaper%20-%20Think%20Correctly.png?raw=1 " width="400"&gt;


Important note:  To embed the image and not make it appear in the DropBox widget, you need to replace the ?dl=0 at the end of the URL with ?raw=1. 



Code:
Download link for &lt;a href="https://www.dropbox.com/s/h29iren2akr83ii/FreeBSD%20Wallpaper%20-%20Think%20Correctly.png?raw=1"&gt;Think Correctly Wallpaper&lt;/a&gt;


Download link for Think Correctly Wallpaper

Box.Com

Unfortunately, you can't embed an image from Box.com because their widget is incompatible with Markdown.  However, you can still share the link  Apple Leather Desktop Walpaper  like the others above.

Code:
&lt;a href="https://app.box.com/s/j68j4nvqcs9uh6zohzisws9o7evnk4kf"&gt; Apple Leather Desktop Walpaper &lt;/a&gt;




Image Attribution.  None of these wallpapers are mine.  They are the work of the original artist and I claim no ownership.  These were sent to me or I found them in my travels on the Internet.    

Summary

Other than the dedicated services, OneDrive and DropBox seem to have the best integration (IMO) for both embedding and linking images into a markdown document.  I'm partial to OneDrive and it's integration directly into macOS, but preferences vary.  DropBox is a bit more efficient with respect to the length of the link.  Box.com falls short in that you can't embed images but you can link to them.