How to Install Imagick in WordPress

Written by WordPress Expert

June 7, 2023
How to Install Imagick in WordPress

Imagick - what’s that? If you’re manipulating images in WordPress, more than likely Imagick is involved. In this article, you’ll learn about the Open Source image manipulation software, as well as how to install Imagick in WordPress.

What is Imagick?


Imagick or ImageMagick or magick is a PHP extension that provides an easy way to alter images in PHP. The ImageMagick image processing library, which is a powerful open-source image processing library that supports over 200 image formats and provides a vast range of image manipulation features.

Imagick is designed to be fast, flexible, and easy to use, which makes it an easy choice for developers when it comes to image processing. Some of the functions it provides for image altering include:

  • Resizing
  • Cropping
  • Rotating
  • Converting images to another image format
  • Adding filters
  • Handle large images
  • Manage colors
  • Add text

….and much more!

Resizing

Imagick provides the ability to resize images to any size while maintaining the aspect ratio if necessary. This also includes thumbnail generation support, which allows users to create smaller fast loading versions of the original image, which work great for image galleries.

Cropping

Imagick gives you the ability to crop an image, especially if you need to remove any unwanted parts of the image.

Rotating

Imagick lets you rotate images by any angle, either clockwise or counterclockwise or even flipping the image. This is great in case you have an image that you uploaded that was a portrait and it was somehow showing as a landscape image.

Converting images to another image format

Imagick supports many types of image formats, including JPEG, PNG, TIF, GIF, BMP, and more. With this feature, this means you can convert the image to any format, especially ones that may be more optimized and load faster on a website.

Adding filters

Imagick supports a range of filters, which include: blur, sharpen, emboss, grayscale, and more. You can use these filters to improve the image’s appearance or to give it a more artistic look.

Handle large images

If you’re a photographer and like to work with larger sized images, Imagick can handle them.

Manage colors

Want to add colors or edit any colors? Imagick can do that.

Add text

If you need to add text to an image, you can use Imagick to do that.

90%

💸 90% OFF YOUR FIRST MONTH WITH ALL VERPEX HOSTING PLANS FOR WORDPRESS

with the discount code

MOVEME

Grab the Discount

How does Imagick relate to WordPress?


The WordPress image editor uses both the GD Image Manipulation Libraries and Imagick Image Processing Libraries. Through this, when you upload an image to your WordPress Media Library, you can edit your images. WordPress also allows you some of the following functions using Imagick or GD Libraries:

  • Convert images to another file type
  • Display images
  • Crop images
  • Resize images
  • Flip images
  • Process PDFs during upload
  • Save Strip metadata from image
  • Set image compression
  • Thumbnail generation

While WordPress has support for Imagick, the server that the site is on has to have Imagick installed. If it doesn’t, then you may not see all of the features you expect, as the GD Library is not as robust as Imagick.

Why should you use Imagick with WordPress?


In most cases, with most web hosting configurations, you may not need this article. By default, WordPress uses Imagick. However, if you’re using large images, and your site is sluggish, you might need to adjust your Imagick settings. Imagick still provides better quality and more functionality for image manipulation than the GD Library.

So, while there may be some performance issues if you use larger images with Imagick, there are some things you can do, and that’s what this article is about.

How to Install Imagick in WordPress


So, there’s a couple steps to making sure Imagick is working for your site:

  1. Enable the Imagick PHP module using cPanel
  2. Adjust Imagick in WordPress using a plugin

Enable the Imagick PHP module using cPanel

If you’ve found that you might not have Imagick currently active on your web hosting account, you need to get it installed. If your web hosting provides cPanel, you can enable Imagick quite easily. Additionally, the reason why this is a 2-step process is to make sure your site is using the required PHP version for WordPress, which as of April 2023, is 7.4.

Imagick PHP module using cPanel

To do that, log into your cPanel and look for something similar to PHP Tweaks or Selection PHP version.

PHP Tweaks

PHP Tweaks

In PHP Tweaks, select PHP 7.4 (End of life), on the left hand side under PHP version. The right hand side for extensions will change. Look for “imagick” and check the box next to it. This will automatically save your changes.

Selection PHP Version

Selection PHP Version

With Select PHP Version, make sure the drop down for Current PHP Version is set to 7.4. Once you’ve made sure of that, you’ll see a lot of PHP modules. Some have checked boxes and some don’t. Look for “imagick”. Make sure the box is checked next to it.

Adjust Imagick in WordPress using a plugin

ImageMagick Engine

Now that you’ve at least confirmed your WordPress installation is on the required version of PHP, and that from cPanel, imagick is available to you, it’s time to log into WordPress. Go to the Plugins menu item in the dashboard and then click Add New. Search for ImageMagick Engine, then install and activate it.

Not only will this plugin ensure that Imagick is enabled in WordPress, but you can adjust some settings too. When you’ve installed and activated ImageMagick Engine, you can find the plugin’s settings under Settings > ImageMagick Engine.

ImageMagick Engine Settings

If your settings in the plugin look like this, then check the first box that says “Enable enhanced Image engine”. You can adjust how the plugin optimizes for size and quality, and even select what image sizes to optimize.

ImageMagick Engine Setting

When you’ve enabled and selected to save changes, the page will let you know if Imagick is enabled. Lastly, you can opt to regenerate images. However, you may find that using a different solution like the Regenerate Thumbnails plugin, as it has more options that won’t slow your website or make it go down.

50%

💰50% OFF YOUR FIRST MONTH WITH ALL VERPEX MANAGED HOSTING PLANS FOR WORDPRESS

with the discount code

SERVERS-SALE

SAVE NOW

In Summary


Hopefully this article will help you with how to install Imagick in WordPress. However, if you’re not sure if it’s already installed, you could either check or ask your web host company’s technical support. They can certainly let you know if the Imagick library is active on your account. In the meantime, happy image manipulation!

Frequently Asked Questions

Is WordPress free?

All you need to do to use WordPress is to invest in a web hosting plan since the software itself is free.

Are WordPress-free themes safe?

People often think that free themes have low quality. However, free WordPress themes actually have high quality and are free to use.

Can WordPress be used for eCommerce?

WordPress offers many different ways to build an eCommerce online store for all types of products and markets. Almost 40 percent of all online shops are powered by WooCommerce, a WordPress eCommerce plugin.

How do I get help with my WordPress site?

There’s never a moment we won’t be here to support the development of your website and your business. Unlike many of our competitors, we’re online 24/7, providing support to our users whenever they need it. We provide a live chat experience so we can quickly communicate in real time, meaning you can swiftly get back to enhancing your customers’ experiences.

Jivo Live Chat