JPEG XL libraries for PHP
PHP’s bundled GD extension doesn’t support JPEG XL.
- Imagick is the PHP extension for ImageMagick. It reads and writes JXL when ImageMagick was built with libjxl, which is the case for ImageMagick 7 in current Linux distributions and Homebrew. Check with
Imagick::queryFormats('JXL').
php-vips (libvips through PHP FFI) is a faster alternative, and also needs a libvips built with libjxl.
- Imagick Imagick reads and writes JPEG XL images in PHP through ImageMagick and libjxl. Check JXL support, convert to and from JXL, set quality, effort.