|
|
@@ -26,7 +26,7 @@ this.imagesMinifier = this.imagesMinifier || (() => {
|
|
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
|
const PREFIX_DATA_URI_IMAGE_SVG = "data:image/svg+xml";
|
|
|
const TRANSFORMED_IMAGE_ATTRIBUTE = "data-single-file-image-transform";
|
|
|
- const IGNORED_ATTRIBUTES = ["src", "width", "height", "viewBox", "preserveAspectRatio", "xlink:href"];
|
|
|
+ const IGNORED_ATTRIBUTES = ["src", "viewBox", "preserveAspectRatio", "xlink:href"];
|
|
|
|
|
|
return {
|
|
|
process: (doc, mediaAllInfo, options) => {
|
|
|
@@ -145,8 +145,6 @@ this.imagesMinifier = this.imagesMinifier || (() => {
|
|
|
});
|
|
|
svgElement.setAttribute(TRANSFORMED_IMAGE_ATTRIBUTE, "");
|
|
|
svgElement.setAttributeNS(SVG_NS, "viewBox", "0 0 " + width + " " + height);
|
|
|
- svgElement.setAttributeNS(SVG_NS, "width", imageData.clientWidth);
|
|
|
- svgElement.setAttributeNS(SVG_NS, "height", imageData.clientHeight);
|
|
|
svgElement.setAttributeNS(SVG_NS, "preserveAspectRatio", "none");
|
|
|
useElement.setAttributeNS(SVG_NS, "xlink:href", "#single-file-" + urlIndex);
|
|
|
const imageElement = doc.getElementById("single-file-" + urlIndex);
|