Markdown isn’t made to accommodate all HTML features; it’s geared towards writing content. It isn’t the answer to every hyperlink possible. To find what you can do, read the Goldmark docs, and if you can’t accomplish your hyperlink put it in a shortcode.
If you know how shortcodes work, then you should know how to use them in markdown. If you know how to use them in markdown, then I don’t understand the question.
There are several examples of shortcodes in in the docs. Some of them are even specifically around images.
I would use Render Hooks. That way you can change the default behavior of the markdown link and image tags.
Here is an example:
I have recently set this up on a Hugo site where the image is hosted on Cloudinary, and then I use the transformations there to generate a srcset of webp images that are lazyloaded.
normal loading images
lazy loading images
links with target="blank" rel="nofollow noopener noreferrer"
links with target="blank" rel="noopener noreferrer"
normal links
All on a single page.
So there are no default images and links. 1 page can contain a mix of the before mentioned links and images.
So not all images are lazy loading, not all links are outgoing links, not all outgoing links have nofollow, etc…
Does your solution work for this?
And why do you think your solution is better than shortcodes?