website icon indicating copy to clipboard operation
website copied to clipboard

Lazy load images to enhance page load times.

Open nisarhassan12 opened this issue 3 years ago • 3 comments

On the Changelog the lighthouse score is 50 and that is because of the fact that all the changelog entries images are loaded on the initial page load.

image

The problem with loading all the images that a page has is that we are never sure if for instance a user will scroll down and see them all thus resulting in unnecessary usage of bandwidth which we can avoid via lazy loading. Lazy loading will help improve the overall performance scores as well.

nisarhassan12 avatar Mar 31 '22 20:03 nisarhassan12

👋🏼 @nisarhassan12 Any Reasons, why it is kept on hold? Or, is there any plan to work upon it?

Siddhant-K-code avatar Sep 13 '22 18:09 Siddhant-K-code

@jacobparis suggested rather than what I have implemented in #1878 we could try native lazy loading by adding the width and height of the image directly to the element.

nisarhassan12 avatar Sep 19 '22 08:09 nisarhassan12

Relevant doc https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading#images_and_iframes

<img src="image.jpg" alt="..." loading="lazy" />

jacobparis avatar Sep 19 '22 08:09 jacobparis