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];