Back to Top Guides
Workflow Guides

Check Images When Converting Markdown to PDF

Prepare image references correctly, verify the preview, and export a PDF that includes diagrams, screenshots, and illustrations.

By MD Opener4 min readPublished Updated

Markdown image syntax is simple, but converting those images to PDF depends on whether the browser can actually retrieve each asset. The converter cannot infer a repository folder, local screenshot directory, or private authenticated image source from a standalone .md file.

Start with the Markdown to PDF converter and confirm every image in the preview before downloading.

Use a reachable image reference

![Architecture diagram](https://example.com/docs/architecture.png)

The URL above is an illustrative placeholder; replace it with a permitted image you control. An accessible HTTPS URL can be portable, but loading it contacts its host. Do not expose private images publicly to make an export work. A path such as ./assets/architecture.png only works when the renderer has access to that exact directory structure.

Image checklist before export

  • Confirm that the preview displays the full image.
  • Check that the URL opens without a separate login.
  • Use a suitable resolution without an unnecessarily large file size.
  • Add concise, descriptive alt text.
  • Avoid very wide images containing tiny labels.

If an image is wider than a document page, scale the source asset or redesign it vertically. Shrinking a dense desktop screenshot to page width often makes its text unreadable.

Run a controlled export check

Before converting a long document, make a one-page test with the same kinds of images the final document uses:

# Image export check

![Small logo](https://example.com/assets/logo.png)

![Wide diagram](https://example.com/assets/wide-diagram.png)

Use URLs for assets you control; the example host above is only a placeholder. Wait until both images have finished loading in the preview, then download the PDF. This small test separates image-access problems from page-length and layout problems.

Record the result for each asset type you plan to use:

Check Expected result
Browser preview The image is visible at a readable size
PDF export The same image appears without a blank box
Offline PDF view The image remains visible after the browser tab is closed

The last check matters because a finished PDF should contain the captured image rather than depend on the original URL being reachable later.

Separate access failures from layout work

If an asset is absent from the one-page test, stop before adjusting margins or resolution. Use the missing-image troubleshooting guide to check its address, permissions, filename, and rendering context. Page-layout changes cannot repair an unavailable resource.

Continue with layout work only after the test asset appears both on screen and in the downloaded document.

Inspect pagination and image quality

The browser preview and the downloaded PDF are different outputs. Reopen the PDF and check every page boundary. A tall image may be split awkwardly, a landscape diagram may become too small, and text inside a screenshot may look soft after capture. Crop unused margins in the source image, use a higher-resolution original when labels are blurred, and place a short explanation beside any diagram that cannot remain legible at page width.

Also test the PDF in the reader your recipient will use. Browser PDF viewers and desktop readers can display page scaling differently, so verify at normal zoom instead of relying only on a thumbnail view.

Design diagrams for a portrait page

An A4 portrait page has much less horizontal room than a desktop documentation window. Prepare wide architecture diagrams as a small series of focused panels, or prepare a landscape appendix in a separate page-layout workflow. The current MD Opener converter uses A4 portrait and has no per-section landscape setting. Keep labels large enough to read after the artwork is reduced.

Use consistent captions such as “Figure 1” and refer to them from the surrounding paragraph. This keeps the explanation usable when pagination moves the artwork away from the sentence that introduces it. Avoid placing essential meaning only in color; include labels or patterns that survive grayscale printing.

For screenshots, crop browser chrome and unrelated panels before adding the asset. A tighter crop preserves useful pixels for the interface being explained. If the screenshot documents a sequence, several numbered crops are usually clearer than one full-screen capture with tiny annotations.

Complete a delivery review

Treat the downloaded file as the deliverable and review it independently from the source:

  1. Confirm the expected number of pages.
  2. Inspect the first and last line on every page for accidental clipping.
  3. Check captions, figure references, and page order.
  4. Zoom to 100% and read the smallest label inside each diagram.
  5. Disconnect from the network, reopen the document, and confirm that the artwork remains present.
  6. Check the final filename and remove draft-only notes before sending it.

Keep the Markdown and original artwork as source material. A PDF is useful for distribution and review, but it is a poor place to make later image corrections.

Keep the PDF useful if an image fails

Alt text should describe the information conveyed by the image, not simply say “screenshot.” Add a short paragraph below critical diagrams so the document remains understandable in text-only contexts.

Once the preview is correct, export through Markdown to PDF and reopen the PDF to inspect each image. Alt text in source does not guarantee a tagged, accessible PDF. If the images still do not load in the preview, fix their sources before generating another PDF; repeated export attempts cannot repair an unreachable URL.

Key takeaways

  • Replace local relative paths with reachable image sources
  • Preview every image before generating the PDF
  • Use descriptive alt text for accessibility and fallback context

Frequently asked questions

Why are images missing after Markdown to PDF conversion?

A relative local path is one possible reason: selecting the Markdown file does not supply its adjacent image folder. Inaccessible hosts, cross-origin access rules, and unsupported image data also need checking.

Can I use images hosted on the web?

Yes, provided the image URL is reachable by the browser and the host permits it to be loaded during the export process.

Does image alt text appear when the image fails?

Renderers may show alt text when an image cannot load, so descriptive text still gives readers useful context.

Workflow Guides

More from Workflow Guides

View category page

Other guide clusters

Discover related Markdown use cases

Browse all guides