@impactor/ngx-lazy-load
v2.0.4
Published
lazy load images or any element has 'srs' or 'srcset' attribute
Readme
lazy load images or any element has 'srs' or 'srcset' attribute
<img data-src="https://example.com/photos/bird.jpg" />The image is loaded only when the element is about to be displayed in the screen. resulting in maximizing the speed of your app, and saving in your bandwidth. also, it helps you get the maximum score in platforms that measure your app's speed.
Use placeholder image. A placeholder is a very light image that is displayed temporarily until the original image loaded.
<img data-src="https://example.com/photos/bird.jpg" src="placeholder.jpg" />Load the best suited image based on the device's screen size using data-srcset
<img data-srcset="https://example.com/photos/bird-small.jpg 1x, https://example.com/photos/bird-big.jpg 2x" src="placeholder.jpg" />