This is an old revision of the document!


Sometimes the lsphp-gd package is not up-to-date which may miss some features like webp support

This is guide for how to manually compile GD extension with webp support

Install dependencies

yum install -y lsphp73-devel gcc libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel

In this example we use lsphp73 , please change it to other appropriate PHP version number if needed.

wget https://www.php.net/distributions/php-7.3.12.tar.gz
tar xzvf php-7.3.12.tar.gz
cd php-7.3.12
cd ext
cd gd
/usr/local/lsws/lsphp73/bin/phpize
./configure --with-php-config=/usr/local/lsws/lsphp73/bin/php-config --with-webp-dir=/usr/include/webp --with-freetype-dir=/usr/include/freetype2/freetype --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-xpm-dir=/usr/include
make
make install

Restart lsphp process if necessary and check phpinfo page again.

  • Admin
  • Last modified: 2019/11/27 17:40
  • by qtwrk