Try these steps, it worked for me
1. In order to install the extension you need to find out the PHP version of your system, open the command line and run the command php -i|find "PHP Version"
2. Run the command to find out if thread safety is enabled php -i|find "Thread Safety"
You’ll have enabled thread-safe or disabled for not thread-safe
3. Run the command to find the architecture php -i|find "Architecture"
4. Once you have found the above parameters download the dll of the PHP extension and the ImageMagick archive from the below URL
https://mlocati.github.io/articles/php-windows-imagick.html
5. Once you have downloaded the file, extract it and copy php_imagick.dll to the ext folder of the PHP installation
6.Copy other dll files(they may start with CORE_RL, FILTER, IM_MOD_RL,or ImageMagickObject depending on the version)) and save them to the PHP root directory (where you have php.exe)
7. Add the like extension=php_imagick.dll in your php.ini file
8. Restart your IIS webserver