有人知道如何在markdown显示本地图像吗?我不想为此设置网络服务器。

我尝试以下markdown,但它不起作用:

![](文件/ \用户形象/ jzhang桌面/孤立。png)


当前回答

据我所知,对于Linux上的VSCode,只有当您将映像放入与.md post文件相同的文件夹中时,本地映像才能正常显示。 即只有! [](image.jpg)或![](。/ image.jpg)将工作。 甚至像![](/home/bala/image.jpg)这样的绝对路径也不能工作。

其他回答

在Jupyter笔记本Markdown,您可以使用

<img src="RelPathofFolder/File" style="width:800px;height:300px;">

只要复制图像,然后粘贴,你就会得到输出

![image.png](attachment:image.png)

要在markdown文件中添加图像,.md文件和图像应该在同一个目录中。在我的情况下,我的.md文件是在doc文件夹,所以我也移动图像到相同的文件夹。然后在.md文件中写入以下语法

![alt text](filename)

[汽车图片](Car .png)

这对我来说很有效。

只需从markdown文件中添加相对图像文件路由

![localImage](./client/src/assets/12.png)

你可能会发现下面的语法类似于markdown中的引用链接,特别是当你有一个文本有许多相同的图像显示时:

![optional text description of the image][number]

[number]: URL

例如:


![][1]

![This is an optional description][2]




[1]: /home/jerzy/ComputerScience/Parole/Screenshot_2020-10-13_11-53-29.png
[2]: /home/jerzy/ComputerScience/Parole/Screenshot_2020-10-13_11-53-30.png