-
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(modern-images): update to include AVIF estimates #12682
Conversation
@@ -16,7 +16,7 @@ const UIStrings = { | |||
/** Imperative title of a Lighthouse audit that tells the user to serve images in newer and more efficient image formats in order to enhance the performance of a page. A non-modern image format was designed 20+ years ago. This is displayed in a list of audit titles that Lighthouse generates. */ | |||
title: 'Serve images in next-gen formats', | |||
/** Description of a Lighthouse audit that tells the user *why* they should use newer and more efficient image formats. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ | |||
description: 'Image formats like JPEG 2000, JPEG XR, and WebP often provide better ' + | |||
description: 'Image formats like WebP and AVIF often provide better ' + | |||
'compression than PNG or JPEG, which means faster downloads and less data consumption. ' + | |||
'[Learn more](https://web.dev/uses-webp-images/).', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs updates here: GoogleChrome/web.dev#5696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
-
closes Evolve the next-generation image formats audit (AVIF) #12295
do we still want to move webp to
uses-optimized-images
at some point or are we dropping that idea and we're good to close that issue? -
how do you feel about updating
modern-image-formats
entry inbyte-efficiency/expectations.js
to include some real level of detail? :) It's pretty light right now and I'm just realizing we don't appear to have any smoke tests for theimage-elements
->modern-image-formats
/uses-optimized-images
pipeline beyond basically that they ran without error.
I'm comfortable dropping that idea. Adding webp encoding to one's pipeline is an order of magnitude different (and more on par with AVIF) than trimming some fat on existing JPEGs. Our 4-part rating system of score, impact, difficulty, actionability would be helpful right about now :)
Yeah SG, though IIRC we avoided detail there because of the unreliable cross-platform differences of the encoding. That was probably before our |
Summary
Updates the modern image formats audit to use AVIF file size estimates according to the plan outlined in #12295 (comment). I initially tried out showing both the WebP and AVIF estimates in the table, but a few problems:
Instead, this PR just replaces the estimate used for the audit results with the AVIF estimate, skips an image if it's already WebP, and moves the WebP estimate to a new property
wastedWebpBytes
.Related Issues/PRs
closes #12295