Nginx reverse proxy server .webp

@djav1985, @Raphael If you want to install and use Webp you can try the following:

This is what I install before installing Hestia as it will enable webp for all php versions that get installed when Hestia installs. Should work with Hestia already installed as well

Note: Versions listed of Webp and ImageMagick are from last time installed and updated install details in my server / vps setup checklist.

I also use Ubuntu 18.04 and install Webp this way, does not break on updates.
Used on Opencart 2.3.0.2 and 3.0.3.1, PHP 7.1 and 7.4 (with webp extension to enable use)

Fix apt is to install packages required by ImageMagick

Fix apt
sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei ‘s/^# deb-src /deb-src /’ /etc/apt/sources.list
sudo apt-get update

Then you need to download and extra / Install ImageMagick/Webp

sudo apt-get install build-essential -y
sudo apt-get build-dep imagemagick -y

go to /usr/src/ then

wget http://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0.tar.gz
tar xf libwebp-1.1.0.tar.gz

then

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xf ImageMagick.tar.gz

Webp dependancies

sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev -y

Compile Webp

cd libwebp-1.1.0
./configure --prefix=/usr
make
sudo make install
cd …

Compile ImageMagick

cd ImageMagick-7.0.9-25. <------ check extracted version folder it was this last time installed

./configure --prefix=/usr
make
sudo make install
cd …

Reboot

or you can try simple version not from source

sudo apt-get install webp libwebp-dev -y

2 Likes