Markdown to PDF with images

Remote URLs are fetched, local files are picked up when you drop the folder. Every image is scaled to the page width at print DPI and never cut across a page. Free.

Free · no sign-up

Field report — pump station B

Site overview

site-b-aerial.jpg · 2400 × 940 px → 15.9 cm wide, 300 DPI
Aerial view of pump station B, taken 2026-08-30

The intake grating was 60 % blocked by debris after the storm.

Wiring

./photos/panel-after.png · local file, embedded
Rewired control panel, terminals 3–7

Local images like ./photos/panel-after.png are resolved when you drop the folder onto the editor.

— 1 —

Converted in your browser. Your file never leaves your device.
1

Paste Markdown, drop local images

Remote ![alt](https://…) images are fetched automatically. For ./images/x.png paths, drag the .md file and its folder onto the editor together.

2

Choose DPI and captions

300 DPI for print, 150 to keep the file small. Alt text becomes a caption under each figure, or hide it.

3

Download PDF

Images are embedded, scaled to the printable width and kept whole on a page. Nothing was uploaded.

How images travel from Markdown into a PDF

An image in Markdown is only a reference: ![alt](path). The picture itself lives somewhere else, on a web server or in a folder next to the file. A PDF has to contain the actual pixels. So the first job of any Markdown to PDF converter is to go and get the images, and this is where most of them fall down: remote images time out, local images become a broken-image icon because the tool never had access to the folder, and the ones that do arrive are pasted at screen resolution and print blurry.

Remote images

URLs starting with http:// or https:// are fetched in your browser while the preview renders. Many image hosts block cross-origin requests, so when a direct fetch fails MDtoDOCX retries through a small proxy that only relays image content types, caps files at 5 MB and keeps nothing. The bytes are then embedded straight into the PDF; the finished file has no external references and opens offline. GitHub user-content URLs, Notion and Imgur links and signed S3 URLs all work as long as the link is reachable when you convert.

Local images

Relative paths such as ./figures/plot.png or images/logo.svg cannot be fetched from the web. Drag the Markdown file together with its folder onto the editor, or drop the whole project directory, and MDtoDOCX reads the image files through the browser's file API and matches them to the paths in the document. Paths are resolved relative to the .md file, exactly as an editor would do it, and ../shared/diagram.png style parent references are followed inside the dropped folder. Base64 data URIs embedded in the Markdown are decoded directly.

Scaling to the page and DPI

A 4,000-pixel-wide photo does not belong on a 15.9 cm line. Every image wider than the printable area is scaled down to fit it while keeping its aspect ratio; narrower images stay at their natural size unless you set a width with an HTML <img width="300"> tag, which is honoured. The DPI option decides how many pixels are kept: 300 DPI is print quality and the default, 150 DPI roughly quarters the file size for on-screen reports, and Original keeps every pixel. JPEGs are re-encoded only when downscaled; PNG and SVG stay lossless, and SVG is embedded as vector so logos and plots print sharp.

Images never break across pages

Each image is wrapped in a figure marked page-break-inside: avoid. If it does not fit in the space left on the page, the whole figure moves to the next page and text fills the gap. Images taller than a page are scaled to fit one page. The caption, built from the alt text, is part of the same figure and cannot be orphaned on the following page. A run of several images, such as screenshots in a tutorial, is paginated one figure at a time so the last one is never split.

Alt text becomes a caption

Alt text is the only place Markdown lets you describe an image, so MDtoDOCX uses it as the caption under the figure, in a smaller face, and also writes it into the PDF's tag tree so screen readers announce it. Switch captions off in the options bar if your alt text is only a file name. Pro adds a numbered "Figure 1:" prefix and a list of figures after the title. The same handling applies when you export to Word: see Markdown to Word with images.

Limits

Free converts up to 10 images per document, each up to 5 MB, which covers the large majority of reports. Pro lifts the count limit, allows 50 MB documents and can run large jobs on our server renderer for very heavy files. Details on Pricing.

MDtoDOCX vs Pandoc vs browser print

What mattersMDtoDOCXPandoc + wkhtmltopdfPrint a preview page
Remote images fetchedYes, with CORS fallbackYes, from the command lineOnly if already loaded
Local imagesDrop the folderMust run in the right directoryBroken unless served
Scaled to page widthAutomaticManual attributesOften overflows
Print DPI control150 / 300 / originalFlags per runScreen resolution
Image split across pagesNeverDepends on CSSFrequently
Alt text as captionYes, optionalYes for figuresNo
SVG kept as vectorYesSometimes rasterisedYes

Frequently asked questions

How do I convert Markdown to PDF with local images?
Drag the .md file and the folder that contains its images onto the editor at the same time, or drop the whole project folder. Relative paths such as ./img/a.png are resolved against the Markdown file's location and the images are embedded in the PDF.
Why does a remote image show as broken?
Either the URL requires a login, or the host blocks cross-origin requests and the proxy fallback was also refused. Open the URL in a new tab; if you need to be logged in to see it, save the file and drop it as a local image instead.
Will large photos make the PDF huge?
Not at the default setting. Images are downscaled to 300 DPI at their printed size, so a 12-megapixel photo printed at page width becomes about 1,900 pixels wide and 300–500 KB. Choose 150 DPI for smaller files or Original to keep every pixel.
Can an image be cut in half by a page break?
No. Each figure is kept on one page. If it does not fit it moves to the next page; images taller than a page are scaled down to fit.
Can I control the width of an image?
Yes. Use an HTML tag with a width attribute, <img src="a.png" width="300">, or add {width=50%} after the Markdown image. Anything wider than the page is scaled down automatically.
Is the alt text shown in the PDF?
By default it appears as a caption under the image and is also stored as the accessible description. Set Alt text to Hidden in the options bar to leave it out of the visible page.
Are my images uploaded?
Local images are read by your browser and never leave your device. Remote images are fetched by your browser; only when a host blocks that does the request go through our image proxy, which relays the bytes and stores nothing.
How many images can I include for free?
Ten per document, up to 5 MB each. Pro removes the count limit and raises the document size to 50 MB.