Intervention Image is an open source image handling and manipulation wrapper library using PHP GD library.
The class is written to make PHP image manipulating more easier and expressive. No matter if you want 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.
The library requires at least PHP version 5.3 and comes with Laravel 4 Facades and Service Providers to simplify the optional framework integration.
// 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 image $img->save('public/bar.jpg');
Do the same in one line of code.
$img = Image::make('public/foo.jpg')->resize(320, 240)->insert('public/watermark.png');