|
|
@@ -497,7 +497,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
const dataAttributeName = DOM.imagesAttributeName(this.options.sessionId);
|
|
|
this.doc.querySelectorAll("img").forEach(imgElement => {
|
|
|
const imgData = this.options.imageData[Number(imgElement.getAttribute(dataAttributeName))];
|
|
|
- if (imgData.currentSrc) {
|
|
|
+ if (this.options.removeHiddenElements && imgData.size && !imgData.size.pxWidth && !imgData.size.pxHeight) {
|
|
|
+ imgElement.setAttribute("src", EMPTY_IMAGE);
|
|
|
+ } else if (imgData.currentSrc) {
|
|
|
imgElement.setAttribute("src", imgData.currentSrc);
|
|
|
}
|
|
|
});
|