Cards with lazy loading images
See original GitHub issueDescription
If an element is appended that includes an img
with the loading="lazy"
attribute. All cards will fail to be laid out. Optimally these elements should be appended and positioned as if they did not have the image (optionally with the width and height applied ahead of time), then re-positioned when the image loads at a later point.
Steps to check or reproduce
This can be reproduced using any grid with images:
- Navigate to https://codepen.io/pen/?&editable=true=https%3A%2F%2Fnaver.github.io%2Fegjs-infinitegrid%2Fassets%2Fhtml%2Fgrid.html
- In the JS section, change (line 1)
var template = '<div class="item"><div class="thumbnail"><img src="${link}../../assets/image/${no}.jpg"></div><div class="info">${text}</div></div>';
to (adding loading="lazy"
)
var template = '<div class="item"><div class="thumbnail"><img loading="lazy" src="${link}../../assets/image/${no}.jpg"></div><div class="info">${text}</div></div>';
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Lazy Loading Images – The Complete Guide - ImageKit.io
Lazy loading images that are not in the viewport improves initial page load performance and user experience. This is an in-depth guide to ......
Read more >How to lazy load a Bootstrap 4 card's image? - Stack Overflow
The Question. In Bootstrap 4.2 how can I lazy load images for a card that will render the appropriate height and width of...
Read more >WordPress homepage cards with lazy load images
WordPress homepage cards with lazy load images · Lazy loaded images · Look and feel of the design · Post navigation · Recent...
Read more >Lazy load images - Oracle Help Center
Lazy loading of images helps pages to provide more content by recognizing which images will be presented to the shopper, and loading them...
Read more >Lazy loading images - web.dev
In this post you will find out how to lazy-load both types of image. Inline images #. The most common lazy loading candidates...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cloewen8
@egjs/infinitegrid
3.7.0 is released. Try it.Works great!