Help installing cwebp binary during build command?

Hi everyone!

Does anyone know if it’s possible to install cwepb binary during build command in CF Pages? I tried with apt-get install webp but of course that requires root.
I also tried with npm install cwebp-bin but that throws a cryptic ERR_UNSUPPORTED_ESM_URL_SCHEME error.

Thanks in advance!

Solved! This shell script did the trick:

wget -c
tar -xvf libwebp-1.2.1-linux-x86-64.tar.gz
export PATH=$PATH:"$(pwd)"/libwebp-1.2.1-linux-x86-64/bin