I am trying to add WebP to ImageMagick supported formats for PHP 7.3 on a WHM dedicated server. Whenever I was adding this question I saw other posts related to this problem but they don't have a solution as I tried everybody's recommendations from those answers.
Here is what the deal is. I want to be able to serve images in WebP format on all our websites hosted on our server. So I installed some plugins to do that but they are trowing this warning which is saying that WebP is a missing ImageMagick format. Well, whenever I am checking PHPINFO under ImageMagick supported formats WebP is really missing.
I am also getting this Notification from that plugin: EWWW Image Optimizer requires exec() to perform local compression. Your system administrator has disabled the exec() function, ask them to enable it.
So I went under the main PHP INI file and under disable_functions = I we don't have any function assigned.
So first I tried to install just libwebp library like this:
$ wget -c https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1-linux-x86-32.tar.gz
$ tar -xvf libwebp-0.6.1-linux-x86-32.tar.gz
$ cd libwebp-0.6.1-linux-x86-32/
$ cd bin/
$ ls
After ls command I get this:
Ok, it is on the server, it is installed but it doesn't show up under ImageMagick supported formats so I tried to Install ImageMagick again from Unix Source.
After download I did tar xvzf ImageMagick.tar.gz
Next configure and compile ImageMagick.
$ cd ImageMagick-7.0.8
$ ./configure
$ make
Install
sudo make install
Configured the dynamic linker run-time bindings:
sudo ldconfig /usr/local/lib
And then I wanted to run the ImageMagick validation suite:
make check
All this worked without any complaint or errors but whenever I check PHPINFO it still doesn't show any changes. What am I doing wrong here? How can I configure the PHP or what am I missing?
Thank you!
convert -version
. webp should show in the list of delegates. If not, then be sure when you installed webp that it did not have any error or need other dependencies installed first. – Viewable