如何在Markdown中展示本地图片?

722

有人知道如何在Markdown中显示本地图片吗?我不想为此设置Web服务器。

我在Markdown中尝试了以下方法,但它并没有起作用:

![image](files / Users / jzhang / Desktop / Isolated.png)


5
请注意:如果文件路径中有空格,必须进行URL编码,否则链接可能在某些系统(例如GitHub)中无法正常工作。 - Christian Long
4
![image](files://C:/Users/jzhang/Desktop/Isolated.png) - stysan
22个回答

-1

基本语法是![图像描述](任意你选择的图片.png "标题")。在我的情况下,我使用了图片名称作为Any\ Image\ of\ your\ choice.png而不是![Image description](Any_Image_of_your_choice.png),但它没有起作用。所以我建议确保检查图像目录,并且图像名称不包含空格,如果有,请使用下划线(_)代替空格。

在Ubuntu 18.04中使用Jupyter笔记本时遇到了Markdown问题。


-2
我有一个解决方案:
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")

TurboByte


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接