Working with images with MD in 2022..would love advice from the DT community and pick your brains!

Unmanaged expectations

I have the impression that the “problems” arising with MD’s handling of images are related to misguided expectations. MD had (I think) not been designed to be a note-taking format. It was (and I might well be wrong there) designed to make writing semi-structured documents easier to write, especially easier than in HTML. And it was designed so that it can easily be rendered to valid HTML. I’m aware that MD can be rendered to nearly anything. But it has a strong penchant towards HTML: HTML elements can be included directly in MD and will be included in the resulting HTML – you can’t include PDF/PS commands in MD and expect them to be rendered in the final PDF/PS.

Markdown was invented to ease HTML production

So, HTML is the main target for MD rendering. HTML relies on links, i.e. pointers to information available not in the document but somewhere else. Yes, you can include images etc directly in HTML documents via data URIs, but nobody is doing that for real world cases and real images – the documents will become simply too large, and data URIs prevent lazy loading.

Usually, HTML is displayed by a user agent, vulgo a “browser”. Nobody is looking at raw HTML for long time, and there’s nothing there to be seen anyway, given that many things the user agent displays are links whose content a human can’t visualize.

MD can be used for note-taking, too

Regardless of all that, many people now use MD for note taking. It is easy, and the rendering results are immediately pleasing (most of the time :wink: ). But many users probably do not understand that what they see in that case is HTML. They see the images, and they think that they are “there” for some definition of “there”. Which they can’t be, because they’re just linked to, exactly as in HTML.

As you described, (La)TeX is better in that aspect. And a lot of people might be happier if they took their notes in LaTeX. However, they’d have to learn a markup language that is a lot (a lot!) more complicated than MD. So I see little chance for that.

MD is losing its character and advantage

So here we are: Many people like MD because it’s simple. And many users do not really understand nor care (and why should they, frankly) what MD was originally meant for. Vendors jump on the band waggon and add their own “extensions” to overcome perceived shortcomings of the format. Notably Obsidian, but also others (see the recent request for “admonitions” support). What was once a simple markup language is going to become a kind of stripped down HTML with more and more complexity, no body to govern over any kind of standard, and an increasing lack of interoperability.

Yes, one could do a lot of things to make MD “better”. Which will simply lead to a gazillion of dialects, each with its own application that can interpret it “correctly”. Maybe in the end, we’ll all simply write HTML again, because it has all these “necessary” features (and the some). Or (hope dies last) users will understand that MD was not made for wysiwyg layout (neither is HTML) and intelligent handling of external resources and switch over to other formats like Pages, Word, Star/LibreOffice, PDF.