GitHub – Markdown to Insert and Display an Image

githubmarkdown

According to the GitHub documentation, the Markdown syntax for inserting an image is:

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

Following their example syntax, I can't seem to be able to make it work.

Even the GitHub logo example does not work.

What am I missing? Or is it a GitHub bug?

Best Answer

You may be missing the full path/location to the image you want to include in your Markdown file.

The example given is a relative path, where the image rests on the same server as the file. In the help, it would assume the image is actually located at:

https://github.com/images/logo.png

But that is not a valid file or location.

In order to make sure you can render an image no matter where you're viewing it from, it's safer to include the full URL, which would include the domain name.

So your example would instead be using something similar to this:

![Bilby Stampede](http://example.com/images/logo.png)