Suggestion: lazy image loading
amureki opened this issue · comments
Rust Saiargaliev commented
Hey Johannes!
Seeing the features of the library, I am thinking if the next thing might fit here.
<img>
tag has loading="lazy"
attribute:
- https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading
- https://caniuse.com/loading-lazy-attr
It might be nice to support adding this attribute via given template tag.
What do you think?
Johannes Maron commented
Hi @amureki,
There already is support for that. I even use it in a test. However, we could document that.
You can pass any keyword argument to the template tag. If it isn't a breakpoint, it will bit added to the img-tag inside the picture tag.
Maybe you can add it to the example?
Best Joe!