

Adding content to image, for example text, shape, other image (watermark), etc.Apply filters to image, for example color, contrast, brightness, etc.GD is another library that is also very popular and it is automatically available in RunCloud server.īoth ImageMagick and GD Library can be used for: ImageMagick is not the only image optimization library in PHP application.

You can use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. It can read and write over 200 image formats, including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. ImageMagick is a free and open-source software that was created in 1987 by John Cristy to create, edit, compose, or convert bitmap images. In this post, we will discuss about how to install ImageMagick PHP Extension (Imagick) for your PHP web application. RunCloud does support the ImageMagick PHP extension, but it is not enabled by default. Restart the apache service using the following command: sudo service apache2 restartĪfter restarting apache, you should be able now to use Imagick from PHP easily ( try to execute any script of the demos shown in imagemagickphp).When building your website, some PHP web applications including WordPress and Laravel may require the additional ImageMagick PHP extension for advanced image processing. Restart apacheĪs last step, you will need to restart the apache service after the installation of Imagick, otherwise you won't be able to use the Imagick class in your PHP code.

This should output imagick in your terminal. You can verify if imagick has been loaded as an extension with the following command: php -m | grep imagick Verify if imagick has been loaded as an extension (optional) The installation takes about 1-2 minutes. The source of the package is the original package of Imagick from pecl. To use Imagick with PHP 7 in your server, you can easily achieve it with the following command: sudo apt-get install php-imagick If you want to install Imagick in your server in just a couple of minutes, follow these steps: 1. It's known on other platforms due to its difficult installation process, however in Ubuntu, installing it is pretty easy thanks to the php-imagick package that installs ImageMagick and Imagick as well. Imagick is the most famous PHP extension to create and modify images using the ImageMagick library.
