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

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

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


当前回答

添加一个本地图像对我来说是这样的:![alt文本](文件://IMG_20181123_115829.jpg)

没有文件://前缀,它不能工作(Win10, notepad++与MarkdownViewer++插件)

编辑:我发现它也适用于html标签,这是更好的方式: <img src="file://IMG_20181123_115829.jpg" alt="alt text" width="200"/> .jpg

Edit2:在Atom编辑器中,它只在没有file://前缀的情况下工作。真是一团糟。

其他回答

下面的工作与图像到文档旁边的子文件夹的相对路径:

![image info](./pictures/image.png)

根据你的工具-你也可以注入HTML markdown。

<img src="./img/Isolated.png">

这假设你的文件夹结构是:

 ├── img
     └── Isolated.jpg
 ├── README.md

我有一个解决办法:

a)互联网示例:

![image info e.g. Alt](URL Internet to Images.jpg "Image Description")

b)本地图像示例:

![image Info](file:///<Path to your File><image>.jpg "Image Description")
![image Info](file:///C:/Users/<name>/Pictures/<image>.jpg "Image Description")

涡轮字节

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

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

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

![alt text](filename)

[汽车图片](Car .png)

这对我来说很有效。