A PHP library for creating, editing, and composing images with a fluent API and interchangeable GD, Imagick, or libvips drivers.
Overview
Intervention Image is a PHP image processing library that offers a single interface for common create, edit, and composition tasks. It targets server-side workflows where developers load image data, apply transforms, and write encoded output through PHP code.
The API uses a fluent style for everyday operations such as scaling, inserting watermarks, and choosing output formats. Behind that interface you can pick GD, the Imagick extension, or libvips as the processing driver, and animated images are supported with each option.
Typical tasks include building thumbnails, overlaying watermarks, and re-encoding large files in a few lines of code. The docs cover reading and creating images, resizing, effects, text and fonts, drawing, animations, colors, transparency, and metadata.
Install the package with Composer on a PHP environment that meets the stated requirements, including a chosen image extension. The package is framework-agnostic and intended to be imported into application code rather than run as a standalone program.
Key features
- Fluent API for common image edits
- Interchangeable GD, Imagick, and libvips drivers
- Animated image support across drivers
- Read, create, resize, and encode images
- Watermark insertion and alignment
- Text, fonts, and drawing primitives
- Colorspaces, profiles, and transparency handling
- Framework-agnostic Composer package
Use cases
- Generate thumbnails in web applications
- Add watermarks to uploaded images
- Re-encode images to different formats
- Compose or overlay multiple image assets
- Server-side batch image manipulation in PHP