简体   繁体   English

如何在 Github/Markdown 中更改图像的大小?

[英]How to I change the size of an image in Github/Markdown?

I'm editing a Readme.md file in a Github repository and have inserted a picture (see https://github.com/khpeek/FMCW-radar ).我正在 Github 存储库中编辑 Readme.md 文件并插入了一张图片(请参阅https://github.com/khpeek/FMCW-radar )。 The picture takes up the full width but is rather grainy that way, and I would prefer to make it smaller.图片占据了整个宽度,但那样颗粒感很大,我更愿意让它变小。 Is there any way to do that?有没有办法做到这一点?

PS I've tried the commands on How to change image size Markdown? PS 我已经尝试过如何更改图像大小 Markdown 的命令? , but they don't seem to work. ,但它们似乎不起作用。

You can change the size of an image in GitHub markdown by using the image link in an HTML img tag:您可以使用 HTML img标签中的图片链接更改 GitHub markdown 中图片的大小:

From this:由此:

![image](https://user-images.githubusercontent.com/link-to-your-image.png)

To this:对此:

<img src="https://user-images.githubusercontent.com/link-to-your-image.png" width="200" />

You must downsize the image in an image editor.您必须在图像编辑器中缩小图像。 You can't change image size on GitHub's flavor of markdown.您无法在 GitHub 的 markdown 风格上更改图像大小。

Also: The image is already very grainy, it's not a result of its size changing.另外: 图像已经非常颗粒状,这不是其尺寸变化的结果。

对于带有链接的图像,我使用了这个。

[<img src="./assets/sql.svg" width="30" />](./link/to/sql/file)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM