Browse Source

Ignore 1x1 images in hiddenImages rule

Gaël Métais 9 years ago
parent
commit
3ff23e1c47

+ 2 - 0
lib/tools/phantomas/custom_modules/modules/domHiddenYLT/domHiddenYLT.js

@@ -52,6 +52,8 @@ exports.module = function(phantomas) {
 
 
                                     if (src === '' || src.indexOf('data:image') === 0) continue;
                                     if (src === '' || src.indexOf('data:image') === 0) continue;
 
 
+                                    if (images[i].width === 1 && images[i].height === 1) continue;
+
                                     if (!lazyLoadableImages[src]) {
                                     if (!lazyLoadableImages[src]) {
                                         path = phantomas.getDOMPath(images[i]);
                                         path = phantomas.getDOMPath(images[i]);