Markdown files can be converted to PDF using pandoc, a swiss-army knife written in Haskell for converting documents between various formats. It calls Latex internally, so it must also be available on your system.

Assuming all images in the .md files start with /images we need to add a proper relative path for pandoc to find those files. So let's prepend ../../.. to them using sed: