-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Suggestions need additional clarity for "Serves images with low resolution" #15221
Comments
Lighthouse will use a device scale factor of 1.75 by default when testing a mobile page. I do think our docs could be more clear on this matter. |
Thank you. That's helpful. Though I'm still a bit confused why it'd be expecting an image of width 393 in that case since that's 1.5x the width defined in the page |
Good question, actually took some digging for me to find out why. The justification is hidden in a jsdoc comment: lighthouse/core/audits/image-size-responsive.js Lines 283 to 329 in 540f55e
We should definitely write our own audit docs for this. |
Aha! Thank you so much for tracking that down. |
The logo image on https://c3.ventures is provided at 262 x 68 pixels. This matches the
style="width: 262px; height: 68px"
as well aswidth="262"
andheight="68"
attributes on the image.It's saying the expected size is 393 x 102, but there's no explanation as to why. The computed dimensions in the inspector are 262 x 68. I'm guessing this is due to a device pixel ratio of 1.5 being used by the test browser or something like that, but there's no information to indicate whether that might be the case. I don't know what DPRs are being tested with or should be supported as a best practice and when I click the link I don't see DPR mentioned at all, so if this is why the image is being flagged on the audit it seems like there's an opportunity for additional documentation.
The text was updated successfully, but these errors were encountered: