jupyter notebook中Markdown插入图片问题
Markdown插入图片的语法:
![Alternative text](link “optional title”)
注释:
Alternative text:替代文本,即当图片不能正常显示的时候显示的文本。这个字段中不能有空格,如果一定要填空格可以使用%20代替,我一般是使用下划线代替空格~
Link:图片的本地地址,或者网络地址,这个地址最好选择相对地址,不能使用绝对地址,如果非要引用不同文件夹的文件,那么解决办法在下面~
Optional Title:鼠标悬停的时候显示的标题和文字,可以不写
相对路径
jupyter notebook可以直接显示,但是输出html就不显示了
![img](./images/matplotlib图像结构.jpeg)
绝对路径
需要加前缀file:///
jupyter notebook可以无法显示,但是输出html和md文件都可以显示
![img](file:///D:/AI学习资料/笔记/images/matplotlib图像结构.jpeg)
网络路径jupyter notebook和输出的文件都可以显示
图床网站https://z4a.net/
base64编码
可以将图像利用网站https://www.strerr.com/cn/base64_encode_img.html 或https://try8.cn/tool/image/base64 转化为base64编码(建议图片为几十k大小)
图片压缩网址https://yasuo.xunjiepdf.com/img/
在![Alternative text](link “optional title”) 其中link改为base64编码即可
jupyter notebook可以直接显示,输出html和md文件也都可以显示