Skip to content
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

Query to assess lazy-loading of LCP image #8

Closed
felixarntz opened this issue Dec 15, 2022 · 7 comments · Fixed by #28
Closed

Query to assess lazy-loading of LCP image #8

felixarntz opened this issue Dec 15, 2022 · 7 comments · Fixed by #28

Comments

@felixarntz
Copy link
Collaborator

  • Create HTTP Archive query to get % of WordPress sites that use loading="lazy" on LCP image
  • Create HTTP Archive query to get % of WordPress sites that are on version >= 5.5 and have at least one image with loading="lazy"
@felixarntz
Copy link
Collaborator Author

cc @vishalkakadiya @pushpakpop

@felixarntz
Copy link
Collaborator Author

Also see related #9 and #10

@vishalkakadiya
Copy link
Collaborator

vishalkakadiya commented Jan 6, 2023

@felixarntz For the second point here, we can take some reference to the query below. What do you say?

Create HTTP Archive query to get % of WordPress sites that are on version >= 5.5 and have at least one image with loading="lazy"

https://discuss.httparchive.org/t/lazy-loaded-lcp-images-by-wordpress-version/2455/2

@felixarntz
Copy link
Collaborator Author

Thanks @vishalkakadiya, that's super useful. It actually helps with both questions. I came up with a query based on it that addresses both points. The first part is the most important one anyway.

See #28, ready for your review :)

@kt-12
Copy link
Collaborator

kt-12 commented Jan 7, 2023

@felixarntz do we need to address the second point?
Create HTTP Archive query to get % of WordPress sites on version >= 5.5 and have at least one image with loading="lazy".

I see your query works on the LCP element only, and In the second point, we need to find at least one image with loding="lazy" across the entire page. This can be obtained from _markup which contains JSON that has images.img.loading.lazy that gives the direct count of lazy loaded images on a page.

@vishalkakadiya
Copy link
Collaborator

@kt-12 Thank you for pointing this out.

In my opinion, I think any one image with the loading="lazy" query is not needed as this epic is for improving the lazy-loading feature to overcome the LCP image issue with the lazy-loading feature.

CC @felixarntz

@felixarntz
Copy link
Collaborator Author

@kt-12 Good catch! I should have explained my thinking in the PR, basically I agree with @vishalkakadiya that I don't think we really need this piece of information. I think having the overall number of sites on WP version >= 5.5 is accurate enough, as lazy-loading is enabled by default and it would require a filter to disable it, which is extremely unlikely to be used when looking at scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants