|
|
@@ -115,6 +115,8 @@ this.imagesMinifier = this.imagesMinifier || (() => {
|
|
|
const imageElement = doc.getElementById("single-file-" + urlIndex);
|
|
|
if (!imageElement.getAttributeNS(SVG_NS, "width") && !imageElement.getAttributeNS(SVG_NS, "height") && imageData.naturalWidth && imageData.naturalHeight) {
|
|
|
imageElement.setAttributeNS(SVG_NS, "viewBox", "0 0 " + imageData.naturalWidth + " " + imageData.naturalHeight);
|
|
|
+ imageElement.setAttributeNS(SVG_NS, "width", imageData.naturalWidth);
|
|
|
+ imageElement.setAttributeNS(SVG_NS, "height", imageData.naturalHeight);
|
|
|
}
|
|
|
imgElement.parentElement.replaceChild(svgElement, imgElement);
|
|
|
}
|