Sabina Akter
2 min readFeb 25, 2021

--

How to add images in GitHub repo in read me file.

When I was maintaining some documents, I was having an issue of getting the images/screen shots related to the documents in my read me file in GitHub repo. Images always help us to understand better the documents and also helps in the future while we are not working for that project for a long time, but need follow that documents again. Adding an image in GitHub read me file is not only great way of learning but also looks more professional. After doing a little research on it, I have the following solutions:

One way of getting images in GitHub read me file: Absolute path method:

Steps:

Go to your GitHub repo read me file

=> Click on issues, create new issue

=> Then drag the image from the image file/folder

=> Copy that path and paste into the documents location of your read me file

=> Then save your commit

You should be able to see the image in the read me file in your repo.

Note: Absolute path is not the best way to do that.

Best way of getting the image: Relative path method:

Steps:

=> Create an images/ or pictures/ folder in your repo

=> Use relative paths to insert a markdown image

=> ![](images/you-picture.png)

As we know, GitHub doesn’t support markdown image sizing, but it allows the HTML img tag
❮img src=”images/you-picture.png” ❯

Then you can add width and height attributes
❮img src=”images/you-picture.png” width=”100" ❯

=> You can specify only 1 attribute to maintain the aspect ratio

Resources:

https://www.youtube.com/watch?v=hHbWF1Bvgf4

--

--