如何在Github上的Markdown文件中显示图像?

如何在Github上的Markdown文件中显示图像?

问题描述:

我想在Github上的Markdown文件中显示一些图像.我发现它是这样工作的:

I want to display some images in a Markdown file on Github. I found it works this way:

![Figure 1-1](https://raw.github.com/username/repo/master/images/figure 1-1.png "Figure 1-1")

但是我需要与他人合作,所以我不想硬编码用户名和回购名称.

But i need to collaborate with others so i don't want the username and repo name hard coded .

我试图用这个:

![Figure 1-1](images/figure 1-1.png "Figure 1-1")

它可以在我的本地磁盘上运行,但不能在Github上运行.

It works on my local disk but not work on Github.

有人知道这个问题吗?

我自己找到了答案.

只需将?raw = true 附加到图像网址即可:

Just simply append ?raw=true to the image url will make the trick:

![](images/table 1-1.png?raw=true)