codingjoe / django-pictures

Responsive cross-browser image library using modern codes like AVIF & WebP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: lazy image loading

amureki opened this issue · comments

Hey Johannes!

Seeing the features of the library, I am thinking if the next thing might fit here.

<img> tag has loading="lazy" attribute:

It might be nice to support adding this attribute via given template tag.
What do you think?

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!