From 855d8a963884082ec300f4da23a28d5fe4fd7403 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 10 Jan 2026 14:50:31 +0000 Subject: [PATCH] Fix images loaded from _canonical_uri tiddlers do not have loading and error classes assigned (#9570) * Fix images loaded from _canonical_uri tiddlers do not have loading and error classes assigned * Create changenote * Joyously fix eslint error --- core/modules/parsers/imageparser.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index c7201445f..a15750425 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", - attributes: {} - }; + 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];