Closed slivos closed 1 month ago
.eleventy.js
eleventyConfig.addPlugin(eleventyImageTransformPlugin, { extensions: "html", formats: ["jpg", "webp"], widths: [928, 715, 616, 668, 488], defaultAttributes: { loading: "lazy", decoding: "async", sizes: "auto", }, });
Wanted something like this when used in Nunjucks 'macro':
<img src="{{ props.image }}" alt="{{ props.imageAlt }}" eleventy:loading="eager" >
attribute-overrides
Can you use loading="eager"? It shouldn’t override existing attributes
loading="eager"
Okay, that works, thank you. :D
.eleventy.js
Wanted something like this when used in Nunjucks 'macro':
attribute-overrides