← Back to blog/Guides

Markdown Images: Add Screenshots, Local Files, and GIFs

Add images with reliable paths and useful alternative text, diagnose broken assets, and choose screenshots or animation based on the task.

F
Faizan Khan
• 7 min read

Add an image in Markdown with ![alternative text](image-path.png). The exclamation mark distinguishes an image from a link; the brackets hold alternative text, and the parentheses hold the image URL or path. The image must also exist at a location the final reader can access. Markdown syntax does not upload a local file by itself.

Markdown
1![Export settings with CSV selected](./images/export-settings.png)

The meaningful HTML is:

HTML
1<img src="./images/export-settings.png" alt="Export settings with CSV selected" />

The paths in this guide are examples for your own content repository. Replace them with the actual assets you publish.

Choose a path for the publication surface

Source kindExampleWhat to verify
Relative path./images/export-settings.pngResolution relative to the document or builder rules
Root-relative path/images/export-settings.pngThe asset exists at the published site's root
Absolute HTTPS URLhttps://example.com/images/export.pngPublic access, stability, and any image-host restrictions
Local machine path/Users/name/Desktop/export.pngUsually not usable by remote readers

A local preview can display a file that is absent from the deployed site. Move or upload the asset through the publication's supported process, then use the resulting path. Do not publish a machine-specific path and expect other computers to find it.

Keep filenames predictable and case-correct. A path that works on a case-insensitive local filesystem can fail on a case-sensitive host. Prefer names without spaces; if a path contains spaces, encode them or use the renderer's supported angle-bracket destination form.

For repository documents, GitHub's image and relative-link guidance describes its own resolution behavior. Another documentation builder may transform the source differently.

Write alternative text for the image's purpose

"Screenshot" and export-settings-final-2.png do not tell a reader what the image contributes. A better label identifies the relevant information: "Export settings with CSV selected."

Use a different approach for different image roles:

  • For an informative screenshot, describe the state or control that matters to the instruction.
  • For a diagram, provide the important relationship in nearby prose or a longer text description.
  • For a linked image, make its destination or action understandable.
  • For a purely decorative image, empty alternative text can be appropriate.

The W3C alternative-text decision tree helps distinguish those roles. Do not use empty text simply because writing a useful description takes effort.

Keep the actual task instructions in text. A screenshot can clarify where a button is, but it should not be the only place where a required setting or recovery step appears.

Optional titles are not captions

Markdown
1![Export settings with CSV selected](./images/export-settings.png "Export options")

The optional quoted title becomes title metadata in a conventional renderer. It is not a reliable visible caption and should not carry essential information. Hover behavior varies across devices and interfaces.

For a portable caption, place a plain paragraph next to the image:

Markdown
1![Export settings with CSV selected](./images/export-settings.png)
2
3The CSV option exports the selected rows in this example.

Use a documented figure or image component if the publication supports one and needs richer caption semantics. Do not invent a universal caption suffix that other Markdown engines will ignore.

Make an image a link

Markdown
1[![Open the export walkthrough](./images/export-settings.png)](./export.md)

The outer brackets create the hyperlink and the inner image provides its content. This is useful for a thumbnail linking to a walkthrough or a diagram linking to a larger version.

Be clear about the destination. If the image opens a full-size asset rather than a procedure, its label and surrounding text should say so. The link guide explains relative destinations and why ordinary nested links should be avoided.

GIFs use ordinary image syntax

Markdown
1![Opening the export menu and choosing CSV](./images/export-menu.gif)

There is no separate Markdown GIF command. Whether animation plays depends on the file, browser, renderer, and any image-processing pipeline. Some export formats or services may show only a still frame.

Use animation only when motion explains something a static image cannot. A short menu interaction might be clearer as two annotated screenshots and written steps. An endlessly looping recording can distract from the surrounding procedure, and an img tag does not provide playback controls by itself.

For automatically moving content running alongside other content, review the W3C pause, stop, or hide guidance. A still alternative and textual instructions are useful, but do not assume they replace a required motion control in every case.

Image size is a separate concern

Standard image syntax does not include width or height. Suffixes such as =600x300 or {width=50%} depend on particular extensions.

If the renderer permits HTML, an image element can request dimensions. An MDX site can also use its supported JSX or image component. The Markdown image-size guide covers proportional dimensions, responsive CSS, editor controls, and the difference between display width and compression.

Do not enlarge a tiny source screenshot and expect its labels to become sharp. Do not shrink a huge source with CSS and assume the downloaded file becomes smaller. Prepare the source asset and its display behavior separately.

A broken-image diagnostic checklist

  1. Confirm that the Markdown parsed into an image rather than a text link.
  2. Open the resolved image URL from the published page.
  3. Check filename case, spaces, folder depth, and the final file extension.
  4. Test access without the author's account or a temporary signed URL.
  5. Confirm the asset is included in the publication, not only the local folder.
  6. Check whether the platform blocks remote hosts or transforms images.
  7. Inspect the alternative text and the image at a narrow reading width.

Before uploading, remove private account data from the actual file. Cropping in a viewer or choosing a small display width may leave the original pixels available. A useful screenshot should be accurate, readable, and safe to distribute, not merely syntactically valid.

FAQ

How do I insert a local image into Markdown?

Place the image in the content project's supported asset location and reference it with image syntax. A local path works for readers only if the publication makes that asset available at the resolved URL.

Why does my Markdown image appear as a link?

The leading exclamation mark may be missing, the syntax may be malformed, or the field may support links but not images. Check the destination's rendering policy.

Can I resize an image with standard Markdown syntax?

No. Core image syntax has no universal dimension parameter. Use documented platform controls, permitted HTML, or a supported component for sizing.

Continue This Guide