Intervention Image is an open source PHP image handling and manipulation library. It provides an easier and expressive way to create, edit, and compose images and supports currently the two most common image processing libraries GD Library and Imagick.

The package includes ServiceProviders and Facades for easy Laravel integration. If you are looking to create image thumbnails, watermarks or format large image files Intervention Image helps you to manage every task in an easy way with as little lines of code as possible.

The library follows the FIG standard PSR-2 to ensure a high level of interoperability between shared PHP code and is fully unit-tested.

Sample usage of the Intervention Image library :

// open an image file
$img = Image::make('public/foo.jpg');
// now you are able to resize the instance
$img->resize(320, 240);
// and insert a watermark for example
$img->insert('public/watermark.png');
// finally we save the image as a new file
$img->save('public/bar.jpg');

And you can do the same thing in one line of code, even if it’s not a recommended way of writing code :

$img = Image::make('public/foo.jpg')->resize(320, 240)->insert('public/watermark.png');

Intervention image require Fileinfo Extension, and support GD Library (>=2.0), Imagick PHP extension (>=6.5.7).  Released under an MIT license.

LEAVE A REPLY

Please enter your comment!
Please enter your name here