From e3d39b460e068d78d98ed34f143ac4a99bb81145 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Tue, 13 Feb 2024 09:30:54 -0600 Subject: [PATCH] Moved some comments to the official docs. --- eleventy.config.images.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/eleventy.config.images.js b/eleventy.config.images.js index c9825fa..b5de176 100644 --- a/eleventy.config.images.js +++ b/eleventy.config.images.js @@ -1,25 +1,17 @@ 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, { - // which file extensions to process + // file extensions to process extensions: "html", formats: ["avif", "webp", "auto"], // widths: ["auto"], - // urlPath: "/img/", - - // If a urlPath is not specified: - - // 1. Relative image sources () will be co-located in your output directory - // with the template they are used in. Warning: if the same source image is used in multiple templates, - // it will be written to two different locations! - // 2. Absolute image sources () will be normalized to your input/content directory - // and written to ${OUTPUT_DIR}/img/ - - // assigned on the HTML tag will override these values. + // e.g. assigned on the HTML tag will override these values. defaultAttributes: { loading: "lazy", decoding: "async"