Hi!
In the documentation I saw that lazy-loading "using an appropriate javascript library" is suggested. Nowadays <img> can take loading="lazy" as attribute, see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#lazy No JS needed.
In _data/picture.yml I have thus created a"default" preset, like so:
presets:
default:
formats: [webp, original]
attributes:
img: 'loading="lazy"'
Maybe that could be added as a default as it's supposed to save loading time or could be added to the documentation.
Hi!
In the documentation I saw that lazy-loading "using an appropriate javascript library" is suggested. Nowadays
<img>can takeloading="lazy"as attribute, see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#lazy No JS needed.In _data/picture.yml I have thus created a"default" preset, like so:
Maybe that could be added as a default as it's supposed to save loading time or could be added to the documentation.