dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.35k stars 1.07k forks source link

[BUG] image encoded in Base64 failed to display #814

Open du33169 opened 1 year ago

du33169 commented 1 year ago

Describe the bug 描述你遇到的错误

使用markdown的base64编码图片语法: Using base64-encoded data for image in markdown:

![img][imgdata]

[imgdata]:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAAApCA...

Firefox:

构建后在文章页面只显示加载动画,控制台无报错。 Only loading animation on the page, no error from the console .

Edge:

图片显示加载失败,同时控制台报错invalid URL The image failed to load, the console reported an error Invalid URL

Expected behavior 期待的行为

图片正常显示。 The picture should be displayed.

Screenshots 屏幕截图

Firefox: 图片

edge: 图片

Build Environment 构建环境

Please try to use Hugo extended version before opening the issue. 请在创建 issue 之前先尝试使用 Hugo extended 版本构建.

Preview Environment 预览环境

Additional Information 补充信息

在开发者工具中,当鼠标悬停在img标签的src属性上,能够正常预览图片,并且删除img标签的其他属性后图片能够正常显示。 In the developer tool when mouse hovering on the "src" attribute of the tag, the image can be previewed successfully. After deleting other attributes, the picture can be displayed successfully on the page.