Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request : Add support for lazy loading images #2055

Open
TheCapsLock opened this issue Dec 15, 2022 · 2 comments
Open

Feature request : Add support for lazy loading images #2055

TheCapsLock opened this issue Dec 15, 2022 · 2 comments

Comments

@TheCapsLock
Copy link

TheCapsLock commented Dec 15, 2022

To make our pages load faster and minimize the use of bandwidth/memory when a user does not scroll a whole page ; we can use the following attribute to make the image load only when needed (lazy loading):

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

references :

@c-git
Copy link
Contributor

c-git commented Dec 15, 2022

This can be done using a shortcode, I'm not sure how else it could be done. Maybe a setting in the config.toml.

@Keats
Copy link
Collaborator

Keats commented Dec 15, 2022

Oh that's nice, I didn't know that attribute. Right now you can do it with a shortcode.
Adding it to the parser is more involved as it's unlikely to be added to pulldown-cmark as they don't seem to add more features. Maybe it could be added to Zola.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants