Adding images to README.md in GitHub

GitHub is an essential software in a developer’s life. Every developer uses it, making learning how to utilize its various tools important. This Answer explains how to add images to the README file in Github.

Before getting started, it’s essential to understand what a README.md is.

What is a README.md in GitHub?

A README.md is a markdown file. It is the first item visitors see when they visit a repository. The file is mainly used to describe the project. It holds significant information and guides developers in fully understanding the project.

One of the ways to explain things is by using visuals. Is it possible to include an image in a README file, though? Yes, it is. Below, we show how to do it.

How to add images to README.md in GitHub

There are two ways to add an image to README.md in GitHub:

  1. Drag and drop: The best and easiest way to add an image file is to drag and drop the desired image from your machine to the README.md file.

Here’s how to do it:

  • Click the pen icon to edit this file.
Click the pen icon to edit
Click the pen icon to edit
  • Drag and drop the image into the edit box.
  • Click the “Commit changes” button to save the image.
  1. Markdown Syntax: Another way is to use the markdown syntax of adding an image. This is possible because this file is a markdown file.

The syntax looks like:

![Alt text](image link)

The syntax starts with !, the alt text is wrapped in the brackets [], and the image link is wrapped in the parentheses.

Note: This method is mainly used when the image to be used is saved somewhere in the repository.

Happy coding!

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved