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?
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
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
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With