xmitter-11ty/eleventy.config.images.js
2024-03-07 08:19:33 -06:00

21 lines
543 B
JavaScript

import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
export default function(eleventyConfig) {
// Read more about this plugin: https://www.11ty.dev/docs/plugins/image/#eleventy-transform
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
// file extensions to process
extensions: "html",
formats: ["avif", "webp", "auto"],
// widths: ["auto"],
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
defaultAttributes: {
loading: "lazy",
decoding: "async",
},
});
};