Stackoverflow热门问题(十三)-怎么给Github的README加图片

文章首发及后续更新:https://mwhls.top/2638.html
新的更新内容请到mwhls.top查看。
无图/无目录/格式错误/更多相关请到上方的文章首发页面查看。

stackoverflow热门问题目录

如有翻译问题欢迎评论指出,谢谢。

怎么给Github的README加图片
  • Midhun MP asked:
    • 最近我加入了Github,并且创建了一些项目。
    • 但不清楚如何给我的README文件加图片。
    • 我查过了不少文章,但都说我需要把图片放在网上,并且在README.md文件里指定路径。
    • 有办法在不使用第三方服务的情况下加入图片吗?
  • Answers:
    • captainclam – vote: 2482
      • 用这个markdown语法:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-6QaExh2B-1624105919376)(http://url/to/img.png)]
      • 如果图片存在你的仓库里,可以直接使用链接指向原始版本的图片,像这样:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3I2JQiN1-1624105919378)(https://github.com/[username]/[reponame]/blob/[branch]/image.jpg?raw=true)]
    • resultsway – vote: 619
      • 用相对路径:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-FXit5Sld-1624105919379)(relative/path/to/img.jpg?raw=true “Title”)]
      • 或者试下.fileExtention
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ri207Zq8-1624105919385)(./directory_1/directory_2/…/directory_n/plot.png)]

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?
      • 有办法在不使用第三方服务的情况下加入图片吗?
  • Answers:
    • captainclam – vote: 2482
      • Try this markdown:
        • 用这个markdown语法:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-LQCRmZ6N-1624105919388)(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.
        • 如果图片存在你的仓库里,可以直接使用链接指向原始版本的图片,像这样:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Mw5rNip3-1624105919390)(https://github.com/[username]/[reponame]/blob/[branch]/image.jpg?raw=true)]
    • resultsway – vote: 619
      • You can also use relative paths like
        • 用相对路径:
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VWP5r4sy-1624105919392)(relative/path/to/img.jpg?raw=true “Title”)]
      • Also try the following with the desired .fileExtention:
        • 或者试下.fileExtention
      • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-64qaP2Ii-1624105919393)(./directory_1/directory_2/…/directory_n/plot.png)]
    • 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值