HEIC libraries for PHP
PHP’s bundled GD extension can’t read HEIC.
- Imagick is the PHP extension for ImageMagick. It reads (and, if an HEVC encoder is present, writes) HEIC when ImageMagick is built with libheif. That’s the case for ImageMagick 7 in current Linux distributions and Homebrew, provided the libheif HEVC plugins are installed. Check with
Imagick::queryFormats('HEIC').
php-vips is a faster alternative using libvips through PHP FFI; it also needs libheif with the HEVC decoder.
- Imagick Imagick reads and writes HEIC images in PHP through ImageMagick and libheif. Check HEIC support, convert iPhone HEIC uploads to JPEG, make thumbnails.