瀏覽代碼

ignore responsive images

Gildas 7 年之前
父節點
當前提交
87ae05c32b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/doc-helper.js

+ 1 - 1
lib/single-file/doc-helper.js

@@ -252,7 +252,7 @@ this.docHelper = this.docHelper || (() => {
 	function getImageData(doc, options) {
 		if (doc) {
 			const data = [];
-			doc.querySelectorAll("img[src]").forEach((imageElement, imageElementIndex) => {
+			doc.querySelectorAll("img[src]:not([srcset])").forEach((imageElement, imageElementIndex) => {
 				const computedStyle = getComputedStyle(imageElement);
 				let imageData = {}, size = getSize(imageElement);
 				if (imageElement.src && size && (!computedStyle.getPropertyValue("background-image") || computedStyle.getPropertyValue("background-image") == "none")) {