Open In App

How to Install Imagick for PHP in MacOS?

Last Updated : 10 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Imagick is an extension of PHP. It helps to create and modify images with the help of a PHP server. It can write various versions of photos. It can write and create new images from the provided ones. One should have already installed PHP on the machine. In this article, we will learn how to install Imagick for PHP on macOS. 

Imagick for PHP 

Imagick works with the help of PHP, which is the most popular software in this field. Imagick uses the ImageMagick API to serve the various applications related to image modifications. There are thousands of libraries that help to rewrite the images and create new ones. The Imagick is able to read any image format like JPEG, PNG, EXR, GIF, etc. 

  1. Imagick helps to create new images with the server of PHP & the help of the API.
  2. Imagick can able to accept various formats of images. It can also modify the images into various other formats.
  3. Imagick is open-source software, that is only used for making software imaging solutions.

Installation Of Imagick For PHP In Mac

Step 1: At first, we should open the terminal of the Mac. There we have to execute the below-mentioned command. Sometimes, the command can install Imagick on the machine. But after the latest update of Imagick & PHP, the command throws an error there. But still, we will start the installation with this command.

Command to install Imagick: pecl install imagick

Note: Users please follow the Step 1. It is advisable to go for the step. Please do not skip the step. If it is throwing an error, then there is no any problem. Sometimes, some important modules get installed by the command. Executing the command will not harm to the machine or the installation process. But not executing the command, may create some problems for some specific machine configuration.

using command : pecl install imagick

 

Step 2: Then we have to paste the GitHub URL of the Imagick. This URL will first download the modules of the Imagick into the machine. Then we will go for the installation process. It will clone the repositories of the Imagick into the machine.

command:   git clone https://github.com/Imagick/imagick

clone the imagick, using git clone https://github.com/Imagick/imagick

 

Step 3: Then we have to execute two commands one after another. We have to move to the directory where the Imagick is cloned. There we need to perform the second command. This command will help to configure the Imagick according to the PHP installed version in the machine.

Commands: 

cd imagick
phpize && ./configure

moving to directory imagick by cd imagick command and using phpize &&./configure

 

Step 4:  It will take a long time to configure & manage the Imagick with the PHP. We will have to wait till the process is completed.

waiting for the process until completed of installation of imagick  in macOS for php

 

Step 5: Then we have to use a single command to install the Imagick into the machine. This command will start installing the Imagick into the machine. It will take some time to install it. We have to wait till the process is completed.

Command:  make

using command: make

 

Step 6: Now, after the installation is completed, we can see a ‘Build Complete’ message on the screen. This shows that we have completed the installation process.

build screen message on the screen

 

Step 7: Now, at last, we have to run the make install command. This command acts as the Finish button. It actually completes the total process & ends the installations. So, we can go forward to our next step.

Command:  make install

using command: make install

 

Step 8: Now, we can open the Dashboard of the PHP server. If we search for the Imagick keyword, we will find the module & other things. So, it is proof that we have successfully completed the process. Hence, we have successfully installed Imagick for PHP on macOS.

opening dashboard of php for confirmation of installation of imagick for php in mac

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads