不好分享, 本地图片路径更改和丢失, 都会导致图片无法加载
2. 插入网络图片
插入网络链接即可, 需将图片先上传至图床.
3. 插入图片的Base64码
base64字符串过于长, 可在末尾设置一个id来调用
![text][id_0]
[id_0]:data:image/png;base64,iVBORwo...
### Picture to Base64
1. 一些在线网站即可将Picture转Base64
[https://tool.chinaz.com/tools/imgtobase](https://tool.chinaz.com/tools/imgtobase)
2. Python代码
```python
import
"""
Picture to Base64
"""
file = open(‘/home/picture/0.png‘, ‘rb‘) # 二进制只读方式打开文件
base_file = base64.b64encode(file.read())
file.close()
txt = open(‘/home/picture/0.txt‘, ‘wb‘)
txt.write(str(base_file))
txt.clost()
"""
Base64 to Picture
"""
base_file = ‘fasDWkkS.....‘
imgData = base64.b64decode(base_file)
file = open(‘/home/picture/1.png‘, ‘wb‘)
file.write(imgData)
file.close()
MarkDown 插入图片 && Picture To Base64
原文:https://www.cnblogs.com/willwuss/p/13662046.html