Images

Markdown to PDF with images

Markdown's image syntax is simple. Getting from a local image on your disk to a working image in the exported PDF is the part most tools fumble. The drag-and-drop flow makes it a five-second move.

·2 min read
Open the converter

What image formats render

  • PNG - preferred for screenshots, diagrams, line art.
  • JPG - preferred for photographs.
  • Data URLs from drag-and-drop.
  • Public HTTPS URLs (e.g. `![](https://example.com/x.png)`).

What doesn't work

  • SVG inline - use a PNG export. SVG support is on the roadmap.
  • Localhost or file:// URLs - the browser cannot fetch them at render time.
  • Images requiring authentication headers.

Captions

The alt text in `![alt text](url)` doubles as the image caption. The renderer prints it centred below the image in italics, smaller than the body. Leave the alt empty (`![](url)`) for an image with no caption.

FAQ

How big can the images be?

There's no hard cap, but a 4MB PNG inflates the document state and slows the live preview. Resize before embedding - a Retina screenshot is usually 2× larger than it needs to be.

Can I size images explicitly?

Standard Markdown image syntax doesn't include a size attribute. Images scale to fit the content width with the aspect ratio preserved. If you need a smaller image, resize the source file.

Are images preserved in DOCX export?

Inline body images are embedded if they're data URLs (drag-and-drop). Remote URLs are converted to text placeholders in the DOCX. For image-heavy documents, export to PDF.

Related

https://md2document.com/markdown-to-pdf-with-images/