- 107 Views
- 31/10/2025
How to Enable JP2 (JPEG 2000) Support in ImageMagick on DirectAdmin
By default, ImageMagick installed via DirectAdmin CustomBuild does not include JP2 (JPEG 2000) support.
This feature requires additional libraries (openjpeg2 or jasper) and custom configuration flags.
Follow the steps below to permanently enable JPEG2000 on your DirectAdmin server.
Step 1: Install JP2 Libraries
Run the following command to install JPEG2000 dependencies:
sudo dnf update -y
sudo dnf install openjpeg2 openjpeg2-devel -y
openjpeg2 → modern and recommended JPEG 2000 implementation
jasper → older, legacy library for compatibility
Step 2: Create a Custom Configuration File for ImageMagick
DirectAdmin stores ImageMagick build options inside the CustomBuild system.
To prevent your changes from being overwritten by future updates, create a custom config file:
nano /usr/local/directadmin/custombuild/custom/configure/imagemagick/configure.php
Add the following lines:
--with-jpeg \
--with-png \
--with-tiff \
--with-webp \
--with-xml \
--enable-shared \
--disable-static
Optional: add --with-jasper if you want to include Jasper as well.
The --with-openjp2 flag is sufficient for most systems.
Save and exit (Ctrl + O, Enter, Ctrl + X).
Step 3: Rebuild ImageMagick via CustomBuild
Rebuild ImageMagick with the new configuration:
./build update
./build imagemagick
If you are using PHP’s Imagick extension, rebuild it too:
For multiple PHP versions:
./build imagick php81
Step 4: Verify JP2 Support
Check if JP2 is now available in ImageMagick:
You should see:
Success — your server now supports JPEG2000.
Step 5: Verify in PHP
To confirm the Imagick PHP extension also supports JP2:
If “JP2” appears → PHP Imagick successfully recognizes the delegate.
Thanks for visit my website
