How to Install ImageMagick for PHP 8.3 in Laragon v6 (Step-by-Step Guide for Laravel Developers)

Muhammad Zeeshan
Published:
Last updated:
How to Install ImageMagick for PHP 8.3 in Laragon v6 (Step-by-Step Guide for Laravel Developers)

As a Laravel full stack developer, I often work with image processing. This includes generating thumbnails, compressing user uploads, and resizing profile images. While PHP’s default GD library is suitable for simple image tasks, ImageMagick and its PHP extension, php_imagick, offer more power for complex image manipulation and improved output quality.

In this post, I’ll explain what php_imagick is, how it compares to php_GD, and provide clear steps to install the ImageMagick library for PHP 8.3 in Laragon v6. This is the last open-source version of Laragon still used by many developers.

I wrote this post based on my experience after spending hours resolving compatibility issues among different builds of PHP, ImageMagick, and Laragon.

Introduction: What Are php_imagick and ImageMagick?

ImageMagick is a powerful open-source software suite for editing, converting, and processing images in over 200 formats such as JPEG, PNG, TIFF, and WebP. It can resize, crop, blur, and apply various effects to images with high quality.

php_imagick is a PHP extension that connects to the ImageMagick library, letting Laravel and PHP developers use ImageMagick’s features directly in PHP scripts.

For example, you can resize or convert an image in PHP like this:

php
$image = new Imagick('example.jpg');
$image->resizeImage(800, 600, Imagick::FILTER_LANCZOS, 1);
$image->writeImage('resized-example.jpg');

This makes php_imagick very useful for Laravel applications that handle user-uploaded images, create dynamic content, or improve image performance on the web.

Difference Between php_GD and php_imagick

Both php_GD and php_imagick are PHP extensions for image manipulation, but they differ in performance, quality, and capabilities.

Feature  GD LibraryImageMagick (php_imagick)
Image QualityDecent for basic operationsSuperior with HDRI and better color depth
PerformanceSlower with large filesFaster and optimized for heavy image tasks
Supported Formats Limited (JPEG, PNG, GIF)200+ formats supported 
Memory EfficiencyHigh memory usageEfficient with memory management
Advanced FeaturesBasic resize/cropFilters, layers, effects, HDR, alpha blending


In short, php_imagick is better than php_GD because it provides higher quality output, more flexibility, and supports advanced image transformations that GD cannot manage.

Why I’m Writing This Post

I couldn’t find a complete guide online that explained how to install ImageMagick build v1809 for PHP 8.3 in Laragon v6. Most tutorials focus on newer versions of Laragon and PHP, which are compatible with the latest ImageMagick builds. However, Laragon v6 uses an older architecture, so installing newer versions causes build mismatches.

When I added the .dll file of php_imagick 3.8.0-8.3 in Laragon v6 and installed the latest ImageMagick version 7.1.2-8, I received an error stating the php_imagick.dll was compiled for build 1809, but the installed ImageMagick version didn’t match.

After searching for a while, I discovered that the compatible version I needed was ImageMagick v7.1.1-46-Q16-HDRI-x64, which I found here: https://www.npackd.org/p/imagemagick64/7.1.1.46.


I decided to write this post for my future reference and to help other Laravel developers facing similar compatibility issues. 


Why Laragon v6?

Laragon v6 is the last free and open-source version of Laragon. Many developers, including myself, still prefer it for local Laravel development because of its lightweight setup, built-in MySQL, and portability.

Even though newer versions of Laragon exist, v6 remains a stable and easy choice for testing Laravel projects without the complexity of Docker or WSL.


Steps to Install ImageMagick for PHP 8.3 in Laragon v6

 Follow these steps carefully. This setup worked perfectly for me.


Step 1: Check System Architecture

First, determine if your Windows system is x64 or x86. You can check this by:

  • Right-clicking This PC → Properties, or
  • Running this command in Command Prompt:
shell
wmic os get osarchitecture


Step 2: Check Thread Safety of PHP

In Laragon, open a terminal and run:

shell
php -i | find "Thread"

Or create a simple PHP file:

php
php_info();

Check if Thread Safety (TS) is enabled or disabled. You’ll need the matching php_imagick build for your PHP configuration (TS or NTS). 

Step 3: Download php_imagick DLL Files

Go to the official PECL repository and download the matching version: https://pecl.php.net/package/imagick.

Choose:

  • Version: php_imagick 3.8.x
  • PHP version: 8.3
  • Architecture: your system type (x64/x86)
  • Thread Safety: same as your PHP build

After downloading, extract the .zip file.


Step 4: Download ImageMagick Software

You can download the installer from the official ImageMagick site: https://imagemagick.org/script/download.php.

If you don’t find your required version (v7.1.1-46-Q16-HDRI-x64) there, get it from: https://www.npackd.org/p/imagemagick64/7.1.1.46

This version worked seamlessly with PHP 8.3 in Laragon v6.


Step 5: Copy Required DLL Files

After extracting the php_imagick package:

Copy the main extension file:

plaintext
php_imagick.dll

 Paste it into:

plaintext
Laragon\bin\php\php-{your_version}\ext\

Then, copy all supporting DLL files (those starting with CORE_RL_ and IM_MOD_RL_) into your PHP root directory:

plaintext
Laragon\bin\php\php-{your_version}\


Step 6: Install ImageMagick Software

Now run the ImageMagick installer:

plaintext
ImageMagick-7.1.1-46-Q16-HDRI-x64.exe

Let it complete the setup. It will automatically register its filters and coders path in Windows environment variables.

 
Step 7: Confirm Installation 

After installation, restart Laragon and open the terminal. Run the following command to confirm ImageMagick installation: 

shell
magick -version

If you see output like this:

plaintext
Version: ImageMagick 7.1.1-46 Q16-HDRI x64

You’re good to go!


Step 8: Enable the imagick Extension

Edit your PHP configuration file:

plaintext
Laragon\bin\php\php-{your_version}\php.ini

 Add this line at the end:

plaintext
extension=imagick

Save the file.


Step 9: Restart Everything

Restart Laragon.

Restart your PC once.

 Run `php -m` to confirm if imagick appears in the list of loaded modules. 

If it does, congratulations! You’ve successfully installed ImageMagick for PHP 8.3 in Laragon v6.


Final Verification in Laravel

To confirm from your Laravel app, you can run a quick check using phpinfo() or test it in Tinker:

shell
php artisan tinker
>>> extension_loaded('imagick')
=> true

If it returns true, you’re all set to use Imagick in your Laravel project!


Conclusion

Installing ImageMagick for PHP 8.3 in Laragon v6 can be confusing due to version mismatches among different builds. However, by using the compatible ImageMagick v7.1.1-46-Q16-HDRI-x64 installer and php_imagick 3.8.0-8.3 DLL, the integration works perfectly.


Now you can use php_imagick in your Laravel projects to:

  • Create advanced image filters
  • Generate dynamic thumbnails
  • Convert formats like WebP, TIFF, or PSD
  • Improve performance and image quality

 
If you’ve faced the same issue, I hope this guide saves you hours of frustration!

Muhammad Zeeshan
Muhammad Zeeshan

Muhammad Zeeshan is a Full-Stack Web Developer and the founder of muhammadzeeshan.dev . He specializes in building secure and scalable web applications using Laravel, React.js, Node.js, and MySQL. Through the articles published here, Zeeshan shares practical insights from his experience in full-stack development, API design, and server deployment—helping developers and businesses create faster, smarter, and more reliable web solutions.