Add lazy loading to custom component images for performance improvements#4424
Add lazy loading to custom component images for performance improvements#4424clicktodev wants to merge 1 commit into
Conversation
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Simek
left a comment
There was a problem hiding this comment.
Adding loading="lazy" is only recommended for images placed not in the initial user viewport, otherwise lazy loading could lead to worse feeling for the users, see:
For most altered components we cannot guarantee they will be below the fold.
Also, the Firefox has a know issue where the order of attributes matter, and loading need to be placed before src attribute, and the prop it itself have some requirements which need to be met which can also slow down the total time website takes to load:
For now, I'm leaning into leaving the code as-is, but if you can provide a performance analysis which will show that there is a meaningful benefit thanks to the changes, it would be a great way to win me over in this case!
Implement lazy loading for images across various components to enhance performance and reduce initial load times.