Excellent software and practical tutorials
ImageMagick Install PHP's Imagick extension in WordPress
ImageMagick It is an open source image processing tool that can create, edit and convert image files in command mode. It supports more than 200 image formats, such as JPEG, GIF, PNG, TIFF, etc. If you want to use ImageMagick in PHP, in addition to running ImageMagick in PHP, the best way is to install the PHP extension Imagick of ImageMagick. Imagick can create and edit images through the ImageMagick API, and ImageMagick and Imagick are also recommended packages for WordPress to install.
First install php-pear, php-devel and gcc:
# dnf install php-pear php-devel gcc
After installing the above packages, install ImageMagick:
# dnf install ImageMagick ImageMagick-devel ImageMagick-perl
If you are using RHEL 8 or CentOS 8, you need to install the GraphicsMagick package instead. GraphicsMagick is a branch of ImageMagick. Use the following command to install it:
# dnf install GraphicsMagick GraphicsMagick-devel GraphicsMagick-perl
After installing ImageMagick or GraphicsMagick, you can install the Imagick PHP extension by executing the following command:
# pecl install imagick
The system will ask the following questions:
Please provide the prefix of Imagemagick installation [autodetect] :
Simply press the Enter key.
After installation, you need to add the imagick.so extension to php.ini and execute the following command:
# echo extension=imagick.so >> /etc/php.ini
Execute the following command to confirm that the imagick installation is complete:
# php -m | grep imagick
If the response is "imagick”, it means the installation is successful.
Finally restart the system