Stackoverflow热门问题(十三)-怎么给Github的README加图片
stackoverflow热门问题目录如有翻译问题欢迎评论指出,谢谢。
怎么给Github的README加图片
- Midhun MP asked:
- 最近我加入了Github,并且创建了一些项目。
- 但不清楚如何给我的README文件加图片。
- 我查过了不少文章,但都说我需要把图片放在网上,并且在README.md文件里指定路径。
- 有办法在不使用第三方服务的情况下加入图片吗?
- Answers:
- captainclam - vote: 2482
- 用这个markdown语法:
![alt text](http://url/to/img.png)
- 如果图片存在你的仓库里,可以直接使用链接指向原始版本的图片,像这样:
![alt text](https://github.com/[username]/[reponame]/blob/[branch]/image.jpg?raw=true)
- resultsway - vote: 619
- 用相对路径:
![Alt text](relative/path/to/img.jpg?raw=true "Title")
- 或者试下
.fileExtention
: ![plot](./directory_1/directory_2/.../directory_n/plot.png)
- Ahmad Ajmi - vote: 316
- 创建一个新的Issue。
- 上传图片到里面
- 复制链接到README文件里。
- 这里的YouTube视频详细解释了过程:
- https://www.youtube.com/watch?v=nvPOUdz5PL4
- captainclam - vote: 2482
How to add images to README.md on GitHub?
- Midhun MP asked:
- Recently I joined GitHub. I hosted some projects there.
- 最近我加入了Github,并且创建了一些项目。
- I need to include some images in my README File. I don't know how to do that.
- 但不清楚如何给我的README文件加图片。
- 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".
- 我查过了不少文章,但都说我需要把图片放在网上,并且在README.md文件里指定路径。
- Is there any way to do this without hosting the images on any third-party web hosting services?
- 有办法在不使用第三方服务的情况下加入图片吗?
- Recently I joined GitHub. I hosted some projects there.
- Answers:
- captainclam - vote: 2482
- Try this markdown:
- 用这个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)
- Try this markdown:
- resultsway - vote: 619
- You can also use relative paths like
- 用相对路径:
![Alt text](relative/path/to/img.jpg?raw=true "Title")
- Also try the following with the desired
.fileExtention
:- 或者试下
.fileExtention
:
- 或者试下
![plot](./directory_1/directory_2/.../directory_n/plot.png)
- You can also use relative paths like
- Ahmad Ajmi - vote: 316
- You can create a New Issue
- 创建一个新的Issue。
- upload(drag & drop) images to it
- 上传图片到里面
- Copy the images URL and paste it into your README.md file.
- 复制链接到README文件里。
- here is a detailed youTube video explained this in detail:
- 这里的YouTube视频详细解释了过程:
- https://www.youtube.com/watch?v=nvPOUdz5PL4
- You can create a New Issue
- captainclam - vote: 2482
共有 0 条评论