The package will use these optimizers if they are present on your system:
Here's how to install all the optimizers on Ubuntu:
sudo apt-get install jpegoptim optipng pngquant gifsicle
And here's how to install the binaries on MacOS (using Homebrew):
brew install jpegoptim optipng pngquant gifsicle
apt-get install --no-install-recommends libvips42 # install libvips without nip2