From ee42f2f7310500655f43b6ef26f62e7ffbf89aaa Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 10 Jan 2026 14:27:36 +0000 Subject: [PATCH] Fix images loaded from _canonical_uri tiddlers do not have loading and error classes assigned --- core/modules/parsers/imageparser.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index c7201445f..5ef0c5346 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -11,17 +11,16 @@ The image parser parses an image into an embeddable HTML element var ImageParser = function(type,text,options) { var element = { - type: "element", - tag: "img", + type: "image", attributes: {} }; if(options._canonical_uri) { - element.attributes.src = {type: "string", value: options._canonical_uri}; + element.attributes.source = {type: "string", value: options._canonical_uri}; } else if(text) { if(type === "image/svg+xml" || type === ".svg") { - element.attributes.src = {type: "string", value: "data:image/svg+xml," + encodeURIComponent(text)}; + element.attributes.source = {type: "string", value: "data:image/svg+xml," + encodeURIComponent(text)}; } else { - element.attributes.src = {type: "string", value: "data:" + type + ";base64," + text}; + element.attributes.source = {type: "string", value: "data:" + type + ";base64," + text}; } } this.tree = [element];