Home/Docs/Markdown Images

Markdown Images

Images make Markdown documents easier to understand and more engaging. Whether you're writing a GitHub README, project documentation, blog post, or notes, Markdown lets you insert images using a simple and consistent syntax.

This guide explains how to add images in Markdown, use image URLs, reference local files, write good alt text, and understand platform differences. Every example can be copied directly into your Markdown document.

Practice as you read: Open the Markdown Editor with live preview to test image syntax, or read the blog tutorial How to Add Images in Markdown for a step-by-step walkthrough.

Open EditorDownload PDF

What is Markdown Image Syntax?

The basic syntax is simple.

![Alt Text](image.png)

Example

![Project Logo](logo.png)

This displays the image named logo.png with the alt text Project Logo.

If you're new to Markdown, start with Markdown Basics. For clickable images, see Markdown Links.

Markdown Image Syntax Explained

![Alt Text](image.png)
Part Description
! Indicates an image
[] Alternative text
() Image path or URL

The exclamation mark is what makes this different from a normal Markdown link.

Add an Image from a URL

You can display any publicly accessible image.

![Mountain](https://example.com/mountain.jpg)

This is useful for:

  • GitHub README files
  • Documentation
  • Blogs
  • Wikis

Add a Local Image

If the image is inside your project folder:

![Logo](images/logo.png)

Folder example

project/
โ”‚
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ images/
    โ””โ”€โ”€ logo.png

Relative paths are recommended for GitHub repositories.

Relative vs Absolute Image Paths

Relative path

![Logo](images/logo.png)

Works inside the same project.

Absolute URL

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

Loads the image from another website.

Markdown Images in GitHub

GitHub supports normal Markdown image syntax.

Example

![Screenshot](images/app.png)

GitHub automatically renders the image inside README.md files.

For best results:

  • Keep images inside your repository
  • Use relative paths
  • Add descriptive alt text
  • Optimize image size before uploading

Add Alt Text

Alt text describes the image.

![Markdown Logo](logo.png)

Benefits

  • Better accessibility
  • Better SEO
  • Helpful if the image cannot load

Avoid

![image](logo.png)

Better

![Markdown Editor Screenshot](editor.png)

Can You Resize Images in Markdown?

Standard Markdown does not support image resizing.

This does not work in most parsers:

![Logo](logo.png){width=200}

Many platforms ignore this syntax entirely.

Resize Images with HTML

If your Markdown platform supports HTML:

<img src="logo.png" width="250" alt="Logo">

You can also specify:

  • width
  • height
  • loading
  • style (depending on platform)

Image Title

You can add a title attribute.

![Logo](logo.png "Project Logo")

Some Markdown renderers display this as a tooltip when users hover over the image.

Supported Image Formats

Most Markdown editors support:

  • PNG
  • JPG / JPEG
  • GIF
  • SVG
  • WebP

Support may vary depending on the platform.

Common Markdown Image Examples

Repository logo

![Project Logo](logo.png)

Screenshot

![Application Screenshot](images/dashboard.png)

Remote image

![Landscape](https://example.com/image.jpg)

Clickable image

[![Visit Website](logo.png)](https://example.com)

Common Mistakes

Image not showing

Check:

  • File name
  • Folder name
  • File extension
  • Path spelling

Wrong relative path

Wrong

![Logo](logo.png)

Correct

![Logo](images/logo.png)

Missing alt text

Instead of

![](logo.png)

Use

![Project Logo](logo.png)

Broken URL

Verify the image URL is publicly accessible before publishing.

Best Practices

  • Use descriptive alt text
  • Compress large images
  • Store images inside your repository
  • Prefer relative paths for GitHub projects
  • Keep filenames simple
  • Use meaningful filenames
  • Test images after publishing

Platform Compatibility

Platform Image Support
GitHub โœ… Full
GitLab โœ… Full
Obsidian โœ… Full
VS Code Preview โœ… Full
Notion Partial
Discord Partial
Reddit Limited

Continue Learning

Continue learning Markdown with these guides:

Available now

Coming soon to MDConvertHub Docs

  • Markdown Code Blocks

Open the Markdown Editor to test image syntax with live preview.

Frequently Asked Questions

  1. 1

    How do I add an image in Markdown?

    Use ![Alt Text](image.png) and replace image.png with your image path or URL.

  2. 2

    Can Markdown display images from a URL?

    Yes. Use ![Example](https://example.com/image.png) with any publicly accessible image URL.

  3. 3

    Can I resize images in Markdown?

    Standard Markdown does not support resizing. Use HTML <img> tags if your platform allows it.

  4. 4

    Why is my Markdown image not showing?

    Usually because of a wrong file path, incorrect filename, missing file, or broken URL.

  5. 5

    Should I use relative paths?

    Yes. Relative paths are recommended for GitHub repositories because they continue working when the repository is cloned.

  6. 6

    Does GitHub support Markdown images?

    Yes. GitHub fully supports Markdown image syntax in README files, documentation, issues, pull requests, and Wikis.