---
application: "Intervention Image"
version: "Version 4"
status: "stable"
---

# Intervention Image

## PHP Image Processing

Intervention Image is the most popular open source PHP image processing library. It provides an easy and expressive way to edit images and supports PHP's three most common image processing libraries GD Library, Imagick or libvips.

### Features

- Fluent API for common image editing tasks
- Interchangeable driver architecture for all popular PHP image processing extensions
- Support for GD, Imagick and [libvips](https://github.com/Intervention/image-driver-vips)
- Processing of animated images with all drivers
- Support for colorspaces and profiles
- Support for text wrapping and line height in the font system

The library is written to make PHP image manipulation easy and effortless.
Whether you want to create image thumbnails, set watermarks, or format large
image files, Intervention Image helps you accomplish any task with just a few
lines of code. 

### Code Example

```php
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
use Intervention\Image\Alignment;
use Intervention\Image\Format;

// create image manager instance using the desired driver
$manager = ImageManager::usingDriver(Driver::class);

// read image data from path
$image = $manager->decodePath('images/example.webp');

// scale image by height
$image->scale(height: 300);

// insert a watermark
$image->insert('images/watermark.png', alignment: Alignment::BOTTOM_RIGHT);

// encode edited image
$encoded = $image->encodeUsingFormat(Format::JPEG, quality: 65);

// save encoded image
$encoded->save('images/example.jpg');
```

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

Read how to [install Intervention Image](https://image.intervention.io/v4/getting-started/installation.md) or take a look at the [live demo](https://image.intervention.io/v4/playground.md) to try the results of resizing functions directly.

---

## Become a Sponsor

### Intervention Image needs your help to keep the project going

Intervention Image is non-commercial, open source licensed and completely free to use. The considerable
effort required to maintain and develop the software is only possible with the financial support
of sponsors. There are two ways in which you can support this project.

- Support via [GitHub Sponsors](https://github.com/sponsors/Intervention)
- Support via [Ko-Fi](https://ko-fi.com/interventionphp)