-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(uses-responsive-images): higher threshold with breakpoints #13853
Merged
connorjclark
merged 11 commits into
GoogleChrome:master
from
TripleEquals:responsive-image-srcs
Jun 29, 2022
Merged
core(uses-responsive-images): higher threshold with breakpoints #13853
connorjclark
merged 11 commits into
GoogleChrome:master
from
TripleEquals:responsive-image-srcs
Jun 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update to include an allowable waste amount for images that use multiple sources, or are picture elements.
TripleEquals
changed the title
Responsive image srcs
Report: Loosen responsive image audit
Apr 14, 2022
TripleEquals
changed the title
Report: Loosen responsive image audit
report: responsive image srcs
Apr 14, 2022
TripleEquals
changed the title
report: responsive image srcs
report: responsive image srcs loosening
Apr 14, 2022
TripleEquals
changed the title
report: responsive image srcs loosening
report: loosening of responsive-image-srcs
Apr 14, 2022
lighthouse-core/audits/byte-efficiency/uses-responsive-images.js
Outdated
Show resolved
Hide resolved
lighthouse-core/audits/byte-efficiency/uses-responsive-images.js
Outdated
Show resolved
Hide resolved
lighthouse-core/audits/byte-efficiency/uses-responsive-images.js
Outdated
Show resolved
Hide resolved
LGTM, but can you add tests in |
Added a couple test cases that should exercise the picture & srcset conditions. |
lighthouse-core/test/audits/byte-efficiency/uses-responsive-images-test.js
Show resolved
Hide resolved
lighthouse-core/test/audits/byte-efficiency/uses-responsive-images-test.js
Show resolved
Hide resolved
connorjclark
approved these changes
Apr 27, 2022
connorjclark
changed the title
report: loosening of responsive-image-srcs
core(uses-responsive-images): use lower threshold if breakpoints used
Apr 27, 2022
connorjclark
changed the title
core(uses-responsive-images): use lower threshold if breakpoints used
core(uses-responsive-images): use higher threshold if breakpoints used
Apr 27, 2022
connorjclark
reviewed
May 2, 2022
Should be good once you update master back. |
connorjclark
approved these changes
Jun 29, 2022
connorjclark
changed the title
core(uses-responsive-images): use higher threshold if breakpoints used
core(uses-responsive-images): higher threshold with breakpoints
Jun 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This allows for an increased allowance in the failures of the "uses-responsive-images" audit. Instead of the usual allowed 4096B of waste allowed before the audit fails, this change allows 12288B of waste for images that are either picture elements, or utilize the "srcs" asset. This is to encourage the usage of these attributes.
Feature
The audit "uses-responsive-images" is too restrictive and fails too often. This will allow for greater leniency for developers utilizing multiple sizes.
Related Issues/PRs
#11593