mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 02:36:10 +01:00
🎨 The image address bar is automatically converted to an asset after filling in Base64 https://github.com/siyuan-note/siyuan/issues/16132
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
a64ab76640
commit
48f26f9247
1 changed files with 5 additions and 0 deletions
|
|
@ -1282,6 +1282,11 @@ func processBase64Img(n *ast.Node, dest string, assetDirPath string) {
|
|||
case "image/png":
|
||||
img, decodeErr = png.Decode(dataReader)
|
||||
ext = ".png"
|
||||
if nil != decodeErr {
|
||||
dataReader.Seek(0, 0)
|
||||
img, decodeErr = jpeg.Decode(dataReader)
|
||||
ext = ".jpg"
|
||||
}
|
||||
case "image/jpeg":
|
||||
img, decodeErr = jpeg.Decode(dataReader)
|
||||
ext = ".jpg"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue