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
"Properly size image" report is too strict? #11593
Comments
|
Thanks for filing @bakura10! This audit could do with a bit of loosening, but a few other things to keep in mind too...
For Lighthouse team, inline with file size breakpoint approaches, I think we should ignore up to ~10-20KB of savings even on smaller images to encourage this best practice (if there is picture or srcset already detected, if they didn't use either, then we can keep the lower threshold |
|
@patrickhulce Thanks for the feedback. The GZip compression is a good point, I will try to do some test to check the impact. For the first one I am not sure to follow you there. We have a fluid design so possibly an infinity of different sizes for the image based on the width of the screen. Do you mean maybe that we should provide fixed sizes in the srcset based on the 4-5 most popular sizes? |
No, for fluid sized situations such as yours I'm suggesting generating sizes in increments according to the area of the image rather than a single dimension (you mentioned that they "range from 300px to 1000px by increment of 100px" on its longest dimension). Instead have breakpoints for every 0.1 megapixel increase in resolution (width * height, not just width or just height) or by file size like the method described in this post. If we decide to loosen our thresholds this is the sort of strategy we would respect. |
|
|
is this issue still available to work on? |
|
Yes go for it @sahilcode17! You'll want to look at the uses-responsive-images audit for this one. lighthouse/lighthouse-core/audits/byte-efficiency/uses-responsive-images.js Lines 128 to 137 in a1dfe6c
|
|
can i work on this issue if no one is working on this??? |
Yes |
|
ในวันที่ ส. 2 ต.ค. 2021 02:06 น. Adam Raine ***@***.***>
เขียนว่า:
… can i work on this issue if no one is working on this???
Yes
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11593 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APZGLUWMMDXXYQGDSQJ4NTDUEYBDJANCNFSM4S5I6KMA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
|
Hello! :-) Does anyone is working to fix this problem? |
|
I believe I have the bandwidth to take this on, just looking for some clarification on the intent of the potential fix. The intent as I understand it, is to allow the audit to pass even if the wasted bytes exceed the |
Almost–although we want to encourage breakpoints by image area (not width or height), we weren't thinking of making that explicit in the audit. By introducing a So no sliding threshold. Just a different threshold, if srcset/was in a picture element (these properties are already on the ImageElement artifact).
I couldn't find any reference to this in our docs, so we should probably add one. Anyone know the origin of this "best practice"? |


Summary
Hi !
I am trying to get rid of the "Properly image size" but I am facing a wall here. Here are the kind of errors I get:
After checking, it appears that I serve a 800px image, the actual displayed size is 362px and as the DPI is 2, so to serve a perfect image I would need to serve 362x2 = 724px images. But as the design is fluid, it depends of course of the screen width.
In my srcset, I have images that range from 300px to 1000px by increment of 100px. The issue is that it seems the tolerance is super small, and I would need to serve much more images (maybe by increment of 20 or 30px) ?
I have two problems with that:
I would like to know what is the recommended practice here, and if being too strict here actually does not encourage a bad practice that would like to extremely large document size, and poor usage of CDN.
Thanks :)
The text was updated successfully, but these errors were encountered: