I've used interactive SVGs with ox-html output quite a lot, and I found it necessary to add the following horrible code; I'm not sure it's still required:
----
let svgdoc = object.contentDocument;
let svgid =
object.id;
if (!svgdoc) {
if (object.parentNode /* XXX why is this necessary */)
object.parentNode.innerHTML = "";
return;
}
let found = false;
for (let el of svgdoc.getElementsByTagName("svg")) {
let width = el.getAttribute("width");
let height = el.getAttribute("height");
let width_pt = width.match(/^([0-9]*)pt$/)[1];
let height_pt = height.match(/^([0-9]*)pt$/)[1];
let width_px = 5/4 * width_pt;
let height_px = 5/4 * height_pt;
object.setAttribute("width", width_px + "px");
object.setAttribute("height", height_px + "px");
found = true;
}
----
In my case, the SVG was produced by graphviz, so it always has the width and height attributes.
This is a minor issue, but I also think the fallback message ("Sorry, your browser does not support SVG.") is really horrible and misleading. It's very unlikely to be a browser issue today, and much more likely to be a missing file or a user deliberately disabling SVG. In that case, software shouldn't say it's sorry :-)
"Cannot load SVG file." would be a better message, I think.