intervention/image
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
intervention/gif | 4.1.0 | - | MIT | prod |
Intervention Image is an image handling and manipulation library written in PHP. It provides an easy and expressive way to create, edit, and compose images. The library boasts an interchangable driver architecture and supports animated images. It allows for common tasks to be performed through a simple interface and can function with either the GD Library or the Imagick PHP extension as the base layer for all operations.
Using Intervention Image is done primarily through the ImageManager class. A typical workflow might look like this:
// Create an ImageManager with your desired driver
$manager = new ImageManager('gd');
// Open an image file
$image = $manager->read('images/example.gif');
// Resize the image instance
$image->resize(height: 300);
// Insert a watermark
$image->place('images/watermark.png');
// Encode the edited image
$encoded = $image->toJpg();
// Save the encoded image
$encoded->save('images/example.jpg');
To install Intervention Image in your project, use Composer:
composer require intervention/image
The official documentation for Intervention Image can be found at https://image.intervention.io/v3/. It covers the basics of using the library, offers examples to help get you started, and provides a thorough reference for the library's features and capabilities.