Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add images to README.md on GitHub?

Recently I joined GitHub. I hosted some projects there.

I need to include some images in my README File. I don't know how to do that.

I searched about this, but all I got was some links which tell me to "host images on web and specify the image path in README.md file".

Is there any way to do this without hosting the images on any third-party web hosting services?

like image 467
Midhun MP Avatar asked Jan 24 '13 05:01

Midhun MP


People also ask

How do I upload an image to a readme on GitHub?

You can drag and drop the image from your computer to a comment field in GitHub. Wait for the file to upload and then the URL to the image is right there!

How do I insert an image into a MD file?

Markdown Monster makes this process very easy — simply copy an image to the clipboard and then paste. MM will prompt to save the file for you (or you can embed it into the document as base64 as well) and then embed the resulting — hopefully relative — link to the image file.

Can you put images in readme?

README.md files are created using Markdown which you can use to format text and add images.


1 Answers

Try this markdown:

![alt text](http://url/to/img.png) 

I think you can link directly to the raw version of an image if it's stored in your repository. i.e.

![alt text](https://github.com/[username]/[reponame]/blob/[branch]/image.jpg?raw=true) 
like image 84
captainclam Avatar answered Sep 23 '22 06:09

captainclam