react-responsive-picture icon indicating copy to clipboard operation
react-responsive-picture copied to clipboard

Support for loading attribute

Open number33 opened this issue 4 years ago • 1 comments

Are there plans to support lazy loading of images using the 'loading' attribute?

Reference: https://web.dev/native-lazy-loading/#load-in-distance-threshold

Here is the specific section

Images that are defined using the element can also be lazy-loaded:

<picture>
  <source media="(min-width: 800px)" srcset="large.jpg 1x, larger.jpg 2x">
  <img src="photo.jpg" loading="lazy">
</picture>

Although a browser will decide which image to load from any of the elements, the loading attribute only needs to be included to the fallback element.

number33 avatar Jun 24 '20 15:06 number33

Anyone?

npanajotov avatar Nov 15 '20 18:11 npanajotov