在不使用 HTML img 标签的情况下更改 github flavored markdown 中的图像大小?

Change size of image in github flavored markdown without using HTML img tag?

我仅限于使用 []() 语法来渲染图像(与 <img> 相反)(此限制的原因是因为它目前被用作已知错误的解决方法) .

有没有办法仅使用 []() 约定来调整图像大小(不使用 <img>) ?

到目前为止,我已经尝试了一些没有奏效的方法。最值得注意的是:

在图片末尾添加?s=200/&s=200参数url(推荐here

我目前最好的解决办法是下载图片并调整大小,然后重新上传。从 md 本身或通过更改 url(例如通过参数等)更改其大小的任何方式都会好得多

图像的 GFM (GitHub Flavored Markdown) 规范不包含任何尺寸属性。

意味着 []() 不会在其 HTML 生成的表单中包含任何尺寸元素。

如果你change the Markdown processor to Kramdown for GitHub pages, then this would work:

![test image size](/img/post-bg-2015.jpg){:class="img-responsive"}
![test image size](/img/post-bg-2015.jpg){:height="50%" width="50%"}
![test image size](/img/post-bg-2015.jpg){:height="700px" width="400px"}

使用 HTML 会起作用(前提是您使用图像的 https://raw.githubusercontent.com/,但这在您的情况下是不可能的。

<img src="https://your-image-url.type" width="100" height="100">

你可以试试,为了测试:

{:refdef: style="width: 10px; height: 10px"}
[![Octocat](https://github.githubassets.com/images/icons/emoji/octocat.png)](./somelink)
{: refdef}