-
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
Lighthouse report on AMP page - Offscreen Images #5494
Comments
Thanks for reporting @antoinebisch! This is indeed a bug in our performance simulation. Chrome sometimes seems to think the images are being regularly discovered by parsing the main document instead of being added via script. In this case, we have no way of knowing that they weren't already lazily loaded. We might need to investigate a little more. |
will be fixed by #5504 |
4.0.0-alpha.1 also returns for amp-carousel : Best Practices - Consider marking your touch and wheel event listeners as
Does this result cover this ticket as well? |
@aaron-renovationbrands nope that would be different. In advance though, I'd say we'd need clarification from the AMP if they really need to have the listener be non-passive. That violation comes directly from Chrome. |
Bug report
Provide the steps to reproduce
What is the current behavior?
The report highlighted "Offscreen images" as the top opportunity.
What is the expected behavior?
My tested URL being an AMP page, lazy load of background images is a feature coming out of the box and is a major USP of AMP, which Lighthouse reports against here. Therefore this could send the wrong signals to users who have built similar AMP pages and would not expect this feedback from a performance analysis.
Comments from Malte Ubl (AMP PM) on this issue:
AMP's algorithm is:
Prioritize resources (like images) based on distance to viewport
Eventually (when there is nothing better to do) download resources within 3 viewports of the current viewport.
This was chosen as a trade-off between bandwidth usage and avoiding users having to wait for resources to download as they scroll.
Basically, it seems like lighthouse would prefer a more conservative strategy (less bandwidth used, more waiting for users). I'd appreciate filing a lighthouse bug for them to evaluate whether they shouldn't accept AMP's strategy. My suspicion is that they don't use a large enough doc to notice that AMP stops are 3 viewports.
Environment Information
The text was updated successfully, but these errors were encountered: