New rule: oversized images (#276)

New rule: oversized images
This commit is contained in:
Gaël Métais
2019-01-13 17:18:03 +05:30
committed by GitHub
parent fa216dddd5
commit 8ffab2ae70
10 changed files with 200 additions and 6 deletions
+9
View File
@@ -914,6 +914,15 @@ var policies = {
"hasOffenders": true,
"unit": 'bytes'
},
"imagesTooLarge": {
"tool": "redownload",
"label": "Oversized images",
"message": "<p>This is the number of images with a width >800px on mobile or >1500px on desktop. Try </p><p>Please ignore if the file is used as a sprite.</p><p>Please note that Yellow Lab Tools' engine (PhantomJS) is not compatible with image srcset (unless you use a polyfill). This can lead to incorrect detection.</p>",
"isOkThreshold": 0,
"isBadThreshold": 5,
"isAbnormalThreshold": 10,
"hasOffenders": true
},
"gzipCompression": {
"tool": "redownload",
"label": "Gzip compression",
+1
View File
@@ -5,6 +5,7 @@
"policies": {
"totalWeight": 5,
"imageOptimization": 2,
"imagesTooLarge": 2,
"gzipCompression": 2,
"fileMinification": 1
}