2024-02-12 10:19:19 -05:00
|
|
|
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
|
2023-01-24 09:08:52 -05:00
|
|
|
|
2024-02-12 10:19:19 -05:00
|
|
|
export default function(eleventyConfig) {
|
2024-02-13 10:30:54 -05:00
|
|
|
// Read more about this plugin: https://www.11ty.dev/docs/plugins/image/#eleventy-transform
|
|
|
|
|
2024-02-12 10:19:19 -05:00
|
|
|
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
|
2024-02-13 10:30:54 -05:00
|
|
|
// file extensions to process
|
2024-02-12 10:19:19 -05:00
|
|
|
extensions: "html",
|
2024-01-13 18:35:07 -05:00
|
|
|
|
2024-02-12 10:19:19 -05:00
|
|
|
formats: ["avif", "webp", "auto"],
|
2024-01-13 18:35:07 -05:00
|
|
|
|
2024-02-12 10:19:19 -05:00
|
|
|
// widths: ["auto"],
|
2023-01-24 09:08:52 -05:00
|
|
|
|
2024-02-13 10:30:54 -05:00
|
|
|
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
|
2024-02-12 10:19:19 -05:00
|
|
|
defaultAttributes: {
|
2023-01-24 09:08:52 -05:00
|
|
|
loading: "lazy",
|
2024-02-12 10:19:19 -05:00
|
|
|
decoding: "async"
|
|
|
|
}
|
2023-01-24 09:08:52 -05:00
|
|
|
});
|
|
|
|
};
|