让Imagick 扩展 gd库 支持WebP support

一种方法 换PHP7.4版本gd库 是支持WebP support的

另外一种方法  是已经安装了ImageMagick的

# yum install libwebp libwebp-devel
# yum remove ImageMagick*
# yum install autoconf automake libtool make gcc -y
# wget https://imagemagick.org/download/ImageMagick.tar.gz
# tar xvzf ImageMagick.tar.gz
# cd ImageMagick*
# ./configure
# make
# make install

如果ImageMagick 支持webP, 可以重新配置下

# yum install php-5.6-source-zend-server autoconf automake libtool make gcc -y
# mv /usr/local/zend/lib/php_extensions/imagick.so /usr/local/zend/lib/php_extensions/imagick.so_orig
# cd /usr/local/zend/share/php-source/ext/
# mkdir imagick
# cd imagick/
# wget https://pecl.php.net/get/imagick-3.4.4.tgz
# tar xf imagick-3.4.4.tgz
# cd imagick-3.4.4
# /usr/local/zend/bin/phpize
# ./configure --with-php-config=/usr/local/zend/bin/php-config
# make
# make install
# mv /usr/local/zend/etc/conf.d/imagick.ini /usr/local/zend/etc/conf.d/imagick.ini_orig
# echo "extension=imagick.so" > /usr/local/zend/etc/conf.d/imagick.ini
# chown zend:zend /usr/local/zend/etc/conf.d/imagick.ini
# /usr/local/zend/bin/zendctl.sh restart

Finally, verify that the WebP image format support is added using the phpinfo() page or by executing the command '/usr/local/zend/bin/php -i |grep "ImageMagick supported formats"'