要将图片添加到GitHub上的README.md文件中。

huangapple go评论64阅读模式
英文:

To add images to README.md on GitHub

问题

要在GitHub的README.md文件中添加图片,可以按照以下步骤操作:

确保要添加的图片已经托管在线上。如果没有,你可以将它上传到像Imgur或GitHub本身这样的平台上。

复制要包含的图片的URL。

在你的README.md文件中,使用以下的Markdown语法来嵌入图片:

要将图片添加到GitHub上的README.md文件中。
将“替代文本”替换为图片的简要描述,将“图片URL”替换为你之前复制的图片URL。

保存对README.md文件的更改并将它们提交到你的代码库。

在GitHub上查看你的README.md文件时,图片应该会显示出来。

这是正确的方法吗?

英文:

To add images to a README.md file on GitHub, you can follow these steps:

Make sure the image you want to add is hosted online. If it isn't, you can upload it to a platform like Imgur or GitHub itself.

Copy the URL of the image you want to include.

In your README.md file, use the following markdown syntax to embed the image:

![alt text](image_url)
Replace alt text with a brief description of the image, and image_url with the URL of the image you copied earlier.

Save your changes to the README.md file and commit them to your repository.

When viewing your README.md file on GitHub, the image should be displayed.

Is that a correct way to it?

答案1

得分: 1

使用懒加载的方式来显示图片

<img loading="lazy" width="30px" src="./media/images/image_name.png" alt="image_name png" />
英文:

Or like this

<img width="30px" src="./media/images/image_name.png" alt="image_name png" />

To use lazy loading for image

<img loading="lazy" width="30px" src="./media/images/image_name.png" alt="image_name png" />

答案2

得分: 0

or like html

<img src='./a.jpg' width=60%>

for example&lt;br&gt;
[https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md](https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md)
英文:

or like html

&lt;img src=&#39;./a.jpg&#39; width=60%&gt;

for example<br>
https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md

huangapple
  • 本文由 发表于 2023年7月6日 17:47:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76627549.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定