If you're trying to run imagemin (from grunt or gulp or anything else) on Alpine, you certainly had to meet this error :
Error: spawn /YOUR_PROJECT_PATH/node_modules/jpegtran-bin/vendor/jpegtran ENOENT
or the same with optipng
or gifsicle
instead of jpegtran
.
Here's how to solve it.
First you need to install on Alpine missing package used to compile jpegtran
, gifsicle
and optipng
binaries. Those packages are (at least):
autoconf automake file build-base nasm musl libpng-dev zlib-dev