Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

github picture path

Tags:

github

pictures can't show in github

I use markdown to write note, and when I want to add a picture, I do this:

![Alt desc](/home/user_name/repo_name/pic/pic_name "desc")

here comes a problem, when I git push the repo, the github coouldn't recognize the

absolute path in my computer

so my question is that what the picture path is in github and markdown file?

like image 563
iverson Avatar asked Jun 07 '12 16:06

iverson


1 Answers

You're expected to use an absolute path to a http accessible image

  • ![Alt desc](http://www.example.com/image.png)

If you're willing to link against your own repository, you should use the raw url format.

For instance, the following markdown

  • ![logo](https://github.com/libgit2/libgit2sharp/raw/master/square-logo.png)

should display the following image

logo

Note: An alternate raw format is also supported. The image above can also be accessed through the following url: https://raw.github.com/libgit2/libgit2sharp/master/square-logo.png

Update

Following your comment.

The following markdown in basic_option.md won't work.

  • > ![Alt vmware](https://github.com/liangxiao3/redhat_note/blob/master/pic/basic_vmware.jpg "vmware tool")

Switching it to the markdown below should fix this Indeed, you didn't use the raw url format (see above)

  • ![Alt vmware](https://github.com/liangxiao3/redhat_note/raw/master/pic/basic_vmware.jpg)
like image 138
nulltoken Avatar answered Sep 17 '22 14:09

nulltoken