npm.devtool.tech
👏 You can access 11ty-dither package with using 11TyDither variable in browser devtools!

code/package/bundle size

0B
publish
0B
install
0B
bundle minified
0B
bundle gzipped

Not Ready for Production

@11ty-dither

Dither images at build time for 11ty using dither-me-this.

11ty-dither takes a source image, and outputs dithered images in multiple sizes and formats. It replaces your <img> element with a responsive <picture> element.

@11ty-dither and dither-me-this are open source projects. You can contribute via github.

Setup

npm install @11ty-dither
const { ditherAllImages } = require('@11ty-dither')

module.exports = (eleventyConfig) => {

    const ditherOptions = {
        
        /* Options for dither-me-this work here */

        inputDirectory: './src',
        outputDirectory: './_site',
        imageFolder: '/images',
        palette: ["#000", "#FFF"]
    }

    eleventyConfig.addPlugin(ditherAllImages, ditherOptions)

}
🔎Explore Package🔎CDN Script