Menu

How to Install ImageMagick (Imagick) for PHP 8.3 in Laragon v6

How to Install ImageMagick (Imagick) for PHP 8.3 in Laragon v6

To use Imagick in Laragon v6 with PHP 8.3, you need two matching pieces: the php_imagick 3.8.0 DLL built for PHP 8.3, and ImageMagick 7.1.1-46-Q16-HDRI-x64. A newer ImageMagick fails with a build mismatch. This guide gives you the exact setup that worked for me, step by step.

As a Laravel full stack developer, I work with images a lot: generating thumbnails, compressing user uploads and resizing profile pictures. PHP's built-in GD library handles simple jobs well. When the work gets more demanding, ImageMagick and its PHP extension, php_imagick, give you more control and better-looking output.

I wrote this after spending hours untangling compatibility problems between PHP, ImageMagick and Laragon builds. Below I explain what php_imagick is, how it compares with GD, and how to install it on Windows.

What Are php_imagick and ImageMagick?

ImageMagick is an open-source software suite for editing, converting and processing images. It supports more than 200 formats, including JPEG, PNG, TIFF and WebP, and it can resize, crop, blur and add effects while keeping the quality high.

php_imagick is the PHP extension that connects to the ImageMagick library. With it, Laravel and PHP code can call ImageMagick directly. For example, resizing an image and saving the result looks like this:

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

That makes it useful for any Laravel app that accepts user uploads, builds images on the fly or needs its images to load faster.

php_GD vs php_imagick

Both are PHP extensions for working with images. They differ in quality, speed and what they can do.

Feature GD library ImageMagick (php_imagick)
Image quality Fine for basic operations Better output, with HDRI support and deeper color
Large files Gets slow and heavy Built for heavy image work
Supported formats Limited (JPEG, PNG, GIF and a few more) 200+ formats
Resource control Little you can configure Configurable limits for memory, disk and threads
Advanced features Basic resize and crop Filters, layers, effects, HDR and alpha blending

For quick resizing, GD is still fine. For higher-quality output and transformations GD can't do, Imagick is the better choice.

Why I Wrote This Post

I couldn't find a complete guide for installing the ImageMagick build that matches PHP 8.3 in Laragon v6. Most tutorials target newer versions of Laragon and PHP, which work with the latest ImageMagick builds. Laragon v6 is older, so installing the newest ImageMagick causes a build mismatch.

That's what happened to me. I added the php_imagick 3.8.0 DLL for PHP 8.3 to Laragon v6 and installed the latest ImageMagick, 7.1.2-8. PHP then complained that php_imagick.dll was compiled for build 1809 and the installed ImageMagick version didn't match.

After some searching, I found the version that works: ImageMagick 7.1.1-46-Q16-HDRI-x64. I downloaded it from Npackd.

I'm writing this down for my own future reference, and for other Laravel developers who hit the same mismatch.

Why Laragon v6?

Laragon v6 is the last free, open-source version of Laragon. I still use it, like many other developers, for local Laravel work because it's light, includes MySQL and is portable.

Newer Laragon versions exist, but v6 stays stable and simple for testing Laravel projects without the extra weight of Docker or WSL.

If you're setting up a Linux server instead of a Windows machine, my Laravel VPS deployment guide covers the PHP side of that.

How to Install ImageMagick for PHP 8.3 in Laragon v6

Follow these steps in order. This setup worked cleanly for me.

Step 1: Check Your System Architecture

First find out whether Windows is 64-bit (x64) or 32-bit (x86). Either right-click This PC and open Properties, or run this in Command Prompt:

wmic os get osarchitecture

Step 2: Check PHP Thread Safety

Open a terminal in Laragon and run:

php -i | find "Thread"

You can also create a small PHP file and open it in the browser:

<?php
phpinfo();

Look for Thread Safety, which will be enabled (TS) or disabled (NTS). The php_imagick build you download has to match your PHP build.

Step 3: Download the php_imagick DLL Files

Go to the official PECL imagick page and download the matching version:

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

When the download finishes, extract the .zip file.

Step 4: Download ImageMagick

The installer is on the official ImageMagick download page. If the exact version you need (7.1.1-46-Q16-HDRI-x64) isn't listed there, get it from Npackd.

This is the version that worked with PHP 8.3 in Laragon v6 for me.

Step 5: Copy the Required DLL Files

From the extracted php_imagick package, copy the main extension file:

php_imagick.dll

Paste it into:

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

Then copy all the supporting DLL files, the ones starting with CORE_RL_ and IM_MOD_RL_, into your PHP root folder:

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

Step 6: Install ImageMagick

Now run the ImageMagick installer:

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

Let it finish. It registers its filter and coder paths in the Windows environment variables for you.

Step 7: Confirm the Installation

Restart Laragon, open the terminal and run:

magick -version

If you see output like this, ImageMagick is installed correctly:

Version: ImageMagick 7.1.1-46 Q16-HDRI x64

Step 8: Enable the imagick Extension

Open your PHP configuration file:

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

Add this line at the end and save the file:

extension=imagick

Step 9: Restart Everything

Restart Laragon, then restart your PC once. Afterwards run php -m and check that imagick is in the list of loaded modules.

If it is, you've installed ImageMagick for PHP 8.3 in Laragon v6.

Final Check in Laravel

To confirm it from your Laravel app, use phpinfo() or test in Tinker:

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

If it returns true, Imagick is ready to use in your Laravel project.

Conclusion

Installing ImageMagick for PHP 8.3 in Laragon v6 is confusing mainly because of the build mismatches between versions. Pair the php_imagick 3.8.0 DLL for PHP 8.3 with the ImageMagick 7.1.1-46-Q16-HDRI-x64 installer, and it works.

With Imagick running, you can use it in your Laravel projects to:

  • Apply advanced image filters
  • Generate thumbnails on demand
  • Convert formats such as WebP, TIFF or PSD
  • Improve image quality and performance

If you hit the same version error, I hope this saves you the hours it cost me. If you'd rather hand off a stubborn local or server setup, I also offer bug fixing and environment troubleshooting.

Muhammad Zeeshan

Muhammad Zeeshan

Full Stack Developer

I'm a full-stack developer in Islamabad, Pakistan, with 3+ years of experience building web applications with Laravel, PHP, React.js, and Node.js. I build REST APIs, tune MySQL for speed, and deploy to production on VPS servers, so one developer can take a project from idea to live. I currently work in a government IT Organization and take on freelance and contract projects alongside it. You can hire me directly or through Upwork for remote work with companies worldwide.