Some time ago, I posted a script that does this for quicklook images: Links to a PDF, Pages or other document in an MD document are replaced by their quicklook preview as a data URI.
As you can see in the screenshot, the resulting MD is super-ugly and probably a pita to edit. Especially with large images. But well…