简体   繁体   English

如何在 github 风格的 markdown 中调整 github 图像的大小(即问题 / PRs)?

[英]How to resize github images inside github flavored markdown (i.e. issues / PRs)?

Is there any quick and easy way to change the size of an image pasted into a github issue?是否有任何快速简便的方法可以更改粘贴到 github 问题中的图像大小?

Example例子

Here 'sa random github image. 是随机 github 图像。 If it's used in a github issue like so如果它用于 github 问题,像这样

![image](https://user-images.githubusercontent.com/16319829/79087218-ef769280-7d81-11ea-93d6-a81ea2a7474e.png)

It will display largish.它将显示较大。

How can we easily make it medium or small as simply as possible (preferably by only editing the url or adding something to it)?我们怎样才能尽可能简单地使它成为中型或小型(最好只编辑 url 或添加一些东西)?

What I've tried我试过的

I tried both of these (suggested here ), but neither work:我尝试了这两种方法(建议在这里),但都不起作用:

![image](https://user-images.githubusercontent.com/16319829/79087218-ef769280-7d81-11ea-93d6-a81ea2a7474e.png | width=100)

![image](https://user-images.githubusercontent.com/16319829/79087218-ef769280-7d81-11ea-93d6-a81ea2a7474e.png = 250x250)

Note笔记

  • I'm not sure how it works, but stack overflow have a very convenient convention of adding an l (large), s (small), m (medium) to end of an image url to change the size (I also tried this in github but no luck)我不确定它是如何工作的,但是堆栈溢出有一个非常方便的约定,即在图像 url 的末尾添加一个l (大)、 s (小)、 m (中)来更改大小(我也在github 但没有运气)

This works for me in issues:这在问题上对我有用:

<img src="https://user-images.githubusercontent.com/16319829/79087218-ef769280-7d81-11ea-93d6-a81ea2a7474e.png" data-canonical-src="https://user-images.githubusercontent.com/16319829/79087218-ef769280-7d81-11ea-93d6-a81ea2a7474e.png" width="200" height="200" />

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

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