🎨 Improve image export size for database assets fields https://github.com/siyuan-note/siyuan/issues/16470

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-16 12:34:24 +08:00
parent 8f0a9e052c
commit 315618a77c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -2840,6 +2840,10 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
img.AppendChild(&ast.Node{Type: ast.NodeLinkDest, Tokens: []byte(a.Content)})
img.AppendChild(&ast.Node{Type: ast.NodeCloseParen})
mdTableCell.AppendChild(img)
height := "height: 128px;"
spanIAL := &ast.Node{Type: ast.NodeKramdownSpanIAL, Tokens: []byte("style=\"" + height + "\"")}
mdTableCell.AppendChild(spanIAL)
img.SetIALAttr("style", height)
} else if av.AssetTypeFile == a.Type {
linkText := strings.TrimSpace(a.Name)
if "" == linkText {