Add lazy loading in Theme #2657
Replies: 5 comments
-
I don't think there is much the theme can do here. Could certainly add the new This isn't something the theme can directly impact. You'd need some sort of Jekyll plugin to rewrite Back when my personal site was powered by Jekyll I did this. You can find the plugin source here. You'd also need to install the Lazysizes script to make it work as that was the method I used for lazy loading to support browsers that don't have the new This plugin does something similar and is actually packaged like Jekyll plugin with docs... unlike mine. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. |
Beta Was this translation helpful? Give feedback.
-
If you don't want JavaScript and automatically add |
Beta Was this translation helpful? Give feedback.
-
Thanks for the link, one of these days I will definitely try this solution ! |
Beta Was this translation helpful? Give feedback.
-
You can actually try https://nhoizey.github.io/jekyll-cloudinary/ |
Beta Was this translation helpful? Give feedback.
-
Summary
Sometimes pages contain an awful lot of images. In that case we want these images to only load when the user scrolls down.
Motivation
When your blog post has a lot of content and the people have to scroll to see the images of the content, then Google suggest loading the images after the whole DOM is loaded first.
Most modern websites use lazy loading of images, frames and other site elements
Beta Was this translation helpful? Give feedback.
All reactions