A tool for using @11ty/eleventy-img to process images into different formats and sizes.
npm i
- Set options for the output in the
eleventy.config.js
file. - Place source images into the ./src/img directory.
- Run
npx @11ty/eleventy
oreleventy
if you previously had eleventy installed globally.
// add array of width's you would like output (11ty-img wont upscale)
widths: [600, 900, 1200, 1800],
formats: ['png', 'jpeg', 'webp', 'avif'],