# Adoption of img loading attribute

**URL:** <https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941>\
**Category:** Analysis\
**Created:** [May 15, 2020, 7:55pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941 "2020-05-15T19:55:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixarntz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/felixarntz/32/1763_2.png) [@felixarntz](https://discuss.httparchive.org/u/felixarntz)\
**Post date:** [May 15, 2020, 7:55pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/1 "2020-05-15T19:55:00Z")

</div>

It would be great to gather insights on the adoption of the [`loading` attribute on `img` tags](https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading) over time, including how many sites use it with a value of “lazy” vs “eager”.

Accumulating data for this adoption over time, e.g. from currently until end of the year would be super valuable, especially in order to identify potential spikes and their cause (e.g. the attribute being adopted by certain browsers or CMS platforms).

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [May 20, 2020, 3:28pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/2 "2020-05-20T15:28:34Z")

</div>

Some prior research into this: [Chrome Image Lazy Loading - Sites Already Using it on Week 1!](https://discuss.httparchive.org/t/chrome-image-lazy-loading-sites-already-using-it-on-week-1/1707)

@felixarntz are you looking to get a live look at the current adoption rates or is it more of a year-end retrospective? If the latter we can revisit the queries in the linked thread, otherwise it requires something more elaborate.

---

<div class="post-metadata">

**Author:** ![felixarntz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/felixarntz/32/1763_2.png) [@felixarntz](https://discuss.httparchive.org/u/felixarntz)\
**Post date:** [May 27, 2020, 12:06am UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/3 "2020-05-27T00:06:29Z")

</div>

@rviscomi Thanks for the context, it would be great to have more of a “live” view of current adoption over time. For example, could we do a daily/weekly/monthly (whatever is feasible here, weekly is probably a good middle ground) rundown of how many websites use the `loading` attribute on `img` tags? A preferable outcome would be e.g. creating a figure that has individual graphs for the three possible values “lazy”, “eager”, and “auto”, and show the week-by-week adoption in number of sites.

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [June 3, 2020, 7:55pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/4 "2020-06-03T19:55:01Z")

</div>

This sounds like a good case for adding a new metric to the [State of Images](https://httparchive.org/reports/state-of-images) report.

If we can only provide one stat (as a percent of adoption over time) which of these adoption rates is the most meaningful to measure: sites that have `img[loading]` (any value), sites that specifically have `img[loading=lazy]`, sites that have any of the _valid_ attribute values, or something else?

As for the frequency, we’re limited to monthly granularity.

---

<div class="post-metadata">

**Author:** ![felixarntz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/felixarntz/32/1763_2.png) [@felixarntz](https://discuss.httparchive.org/u/felixarntz)\
**Post date:** [June 3, 2020, 11:38pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/5 "2020-06-03T23:38:51Z")

</div>

SGTM! I think adoption of `img[loading="lazy"]` specifically would be most meaningful.

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [June 5, 2020, 5:20pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/6 "2020-06-05T17:20:42Z")

</div>

Ok great, I’ve filed this FR: [https://github.com/HTTPArchive/httparchive.org/issues/205](https://github.com/HTTPArchive/httparchive.org/issues/205)

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [August 27, 2020, 6:07pm UTC](https://discuss.httparchive.org/t/adoption-of-img-loading-attribute/1941/7 "2020-08-27T18:07:09Z")

</div>

Closing the loop, I’ve added this metric to the Images report: [https://httparchive.org/reports/state-of-images?start=2020\_07\_01&end=latest&view=grid#imgLazy](https://httparchive.org/reports/state-of-images?start=2020_07_01&end=latest&view=grid#imgLazy). Adoption is currently at 5%.
