|
|
@@ -1080,10 +1080,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
} else {
|
|
|
if (content.startsWith(prefixDataURI) || content.startsWith(PREFIX_DATA_URI_NO_MIMETYPE) || content.startsWith(PREFIX_DATA_URI_OCTET_STREAM)) {
|
|
|
if (processDuplicates && duplicate && options.groupDuplicateImages) {
|
|
|
- if (resourceElement.style.getPropertyValue("background-image")) {
|
|
|
- resourceElement.setAttribute(attributeName, content);
|
|
|
- } else {
|
|
|
- DomUtil.replaceImageSource(resourceElement, SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource, options);
|
|
|
+ if (DomUtil.replaceImageSource(resourceElement, SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource, options)) {
|
|
|
DomUtil.insertVariable(doc, indexResource, content, options);
|
|
|
}
|
|
|
} else {
|
|
|
@@ -1305,6 +1302,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
imgElement.style.setProperty("background-origin", "content-box", "important");
|
|
|
imgElement.style.setProperty("background-repeat", "no-repeat", "important");
|
|
|
imgElement.removeAttribute(dataAttributeName);
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
|