xmitter-11ty/eleventy.config.images.js
2024-02-13 09:30:54 -06:00

21 lines
541 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"
}
});
};