Using MAC PORT to install Imagemagick
sudo port install ImageMagick
Install imagick php extension
sudo port install php70-imagick
To check if the imagick extension is installed, we can use this command:
php -r "print(class_exists('imagick'));"
Find the installed extension file: sudo find / -name "imagick.so" -print
Then copy it to extension folder of PHP.