Because otherwise I'll forget how to do this before I have to again.

Pandoc with the --self-contained option will convert your images into Base64 and embed them as data: URIs. For example:

pandoc -o blogpost.html --self-contained --metadata pagetitle="My Blog Post" .\

Note that this generates a complete web page instead of a fragment. If you don’t want that, you can use a custom template. A file with nothing in it but $body$ should work fine.

(NB: Use this sparingly–it’s an inefficient way of encoding binary data.)

About Me

Developer at Brown University Library specializing in instructional design and technology, Python-based data science, and XML-driven web development.