edge icon indicating copy to clipboard operation
edge copied to clipboard

Middleware: Lazy Loading Images

Open barnese3 opened this issue 6 years ago • 1 comments

Middleware feature that will help improve page load time: Lazy Loading — delay the loading of images in long web pages. Images outside of the viewport will not be loaded until the user scrolls to them.

Replace src's with data-image-src tags. Use the IntersectionObserver API to observe when images enter the browsers viewport. When an image comes into view, switch back to src.

For background images, grab their url's and hide/store until image comes into view.

I can get started on this if we think it's a good feature to add.

barnese3 avatar Jan 28 '19 15:01 barnese3

relevant: https://www.xda-developers.com/google-chrome-image-lazy-loading-speed-up-page-loading-mobile/

i8ramin avatar Apr 10 '19 14:04 i8ramin