This module is a crafty preset to compress images if they’re webp, jpg, png, gif or svg


npm install @swissquote/crafty-preset-images --save-dev
module.exports = {
  presets: [


Starting with version 1.14 of Crafty, this preset comes bundled with WebAssembly versions of the various tools used for image reduction. This means that they don’t need to be downloaded from the internet and thus will work in any environment even behind a Corporate Proxy.

Currently we embed the binaries for PNG, JPEG and WEBP. GIF has no binary for the moment (it will just copy the files without compressing them) SVG is handled through a different system

The binaries are taken from by using the same technique as