new_audit: add unsized-images to experimental config#11115
Conversation
…tement in getNonHtmlError
patrickhulce
left a comment
There was a problem hiding this comment.
this looks awesome @lemcardenas! one of the cleanest "draft" PRs I've ever seen 😄
a PR overview with references to what stage this is and what planned followups should be expected (maybe linking to the doc?) would be awesome. I'm thinking we should land this in the experimental-config.js rather than default-config.js until we can update it to support CSS images, but maybe you already discussed an alternative plan/timeline I missed?
Yes! I am planning on adding all of that, I didn't expect feedback on a draft PR 😅
I think placing it in experimental-config is a good idea! I'll switch it over to that today |
connorjclark
left a comment
There was a problem hiding this comment.
only a couple of minor style nits from me. after that it'll be LGTM
Summary
This PR is a first iteration in creating a new audit that confirms users' images are explicitly sized; ultimately preventing layout shift and improving CLS (cumulative layout shift).
Setting explicit sizes for images is an effective way to reduce CLS since images without sizes are a leading contributor to CLS.
Design and detail about explicit sizing on image elements can be found here.
Design and discussion about explicit sizing on various HTML elements can be found here.
This audit is set to remain in experimental config until CSS sizing is included in a future image-elements gatherer PR.
Related Issues/PRs
#10085