This article provides a guide for how to enable HEIF/HEIC image format for use with ImageMagick on cPanel WHM server. This guide is intended for root-level cPanel VPS or cPanel Dedicated Server administrator.
What is HEIF/HEIC?

HEIC/HEIF is a digital container format for storing individual digital images and image sequences. The standard covers multimedia files that can also include other media streams, such as timed text, audio and video.
What is ImageMagick?
ImageMagick is a free and open-source cross-platform software suite for displaying, creating, converting, modifying, and editing raster images.
Since 1987, ImageMagick has become a signature open-source image-editing software, used as both a stand-alone project as well as an ancillary package, bundled with other popular softwares. As such, the ImageMagick package is considered a dependency of many common website softwares, such as WordPress and WHMCS. Therefore, it may be helpful to install on cPanel WHM servers.
How to Enable HEIF/HEIC Image Format for Use with ImageMagick on cPanel WHM Server
You can enable HEIF/HEIC image format for use with ImageMagick on cPanel/WHM servers per PHP version or for all PHP versions.
Install ImageMagick on cPanel/WHM Server for Specific PHP Versions
To install ImageMagick to a cPanel/WHM server for specific PHP version, perform the following steps:
- Login to your cPanel server via SSH or Terminal as the root user.
- Remove the existing ImageMagick packages:
dnf remove ImageMagick ImageMagick-devel -y
- Install the EPEL repository (Remi Repo Requirement):
dnf install epel-release -y
- Install the Remi Repository:
https://blog.remirepo.net/pages/Config-enwget http://rpms.famillecollet.com/enterprise/remi-release-8.rpm
rpm -Uvh remi-release-8.rpmNOTE: You'll notice that this step (#4) omits the download and install of the EPEL rpm that is shown in the Remi Repo installation instructions at the link above. It has been ommited because the EPEL repository has already been installed via yum in step #3 above. - As mentioned earlier in this article, disable the Remi Repository so that packages can only be explicitly installed from it:
yum-config-manager --disable remi-safe -y
- Install ImageMagick directly from the Remi Repository by enabling it only for this one transaction:
dnf install --enablerepo=remi -y ImageMagick7 ImageMagick7-devel
- Find the binaries for PECL for all versions of PHP that you have installed:
find /opt/cpanel/ -iname pecl | grep bin
- For each desired PHP version, uninstall (if needed) and then install the ImageMagick PHP Extension. PHP 74 is used in this example:
/opt/cpanel/ea-php74/root/usr/bin/pecl uninstall imagick
/opt/cpanel/ea-php74/root/usr/bin/pecl install imagickNOTE: When prompted for the ImageMagick prefix, just press enter to and allow it to autodetect. - Check the output to confirm PECL binaries of the cPanel installation:
root@cpanel [~]# find /opt/cpanel/ -iname pecl | grep bin
where ea-phpXX represents the installed PHP versions.
/opt/cpanel/ea-php56/root/usr/bin/pecl
/opt/cpanel/ea-php70/root/usr/bin/pecl
/opt/cpanel/ea-php71/root/usr/bin/pecl
/opt/cpanel/ea-php72/root/usr/bin/pecl
/opt/cpanel/ea-php73/root/usr/bin/pecl
/opt/cpanel/ea-php74/root/usr/bin/pecl
/opt/cpanel/ea-php80/root/usr/bin/pecl
/opt/cpanel/ea-php81/root/usr/bin/pecl
/opt/cpanel/ea-php82/root/usr/bin/pecl
/opt/cpanel/ea-php83/root/usr/bin/pecl
/opt/cpanel/ea-php84/root/usr/bin/pecl
/opt/cpanel/ea-php85/root/usr/bin/pecl
root@cpanel [~]# - For each PHP version, run the following command (modify the commands for the PHP versions):
/opt/cpanel/ea-phpXX/root/usr/bin/pecl install imagick - Example commands:
/opt/cpanel/ea-php56/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php70/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php71/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php72/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php73/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php74/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php80/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php81/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php82/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php83/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php84/root/usr/bin/pecl install imagick
/opt/cpanel/ea-php85/root/usr/bin/pecl install imagick - After each command, confirm the prefix of ImageMagick installation (enter "Return" to use default):
Please provide the prefix of ImageMagick installation [autodetect] :
- Repeat for each PHP version
- When finished, run the following command to restart PHP-FPM (if applicable):
/scripts/restartsrv_apache_php_fpm
- Enable RPMFusion repositories:
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm - Install HEIC format for ImageMagick:
dnf --enablerepo=remi install ImageMagick-heic -y
Conclusion
You have now enabled HEIC/HEIF image format for use with ImageMagick on cPanel/WHM server. If you face any difficulties, please open a support ticket for assistance.

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.