Intervention Image

Fluent PHP image processing with interchangeable GD, Imagick, and libvips drivers

Library
Composer
v4.2.1
14,366stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
87/100Excellent
Development Activity92
Maintenance72
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture84
Code Quality82
Innovation72
Learning Curve78

Intervention Image is a PHP library for creating, editing, and composing images through a single fluent, expressive API that abstracts over the underlying image-processing engine. It ships driver implementations for GD and Imagick out of the box (with libvips available as a separate driver package), so the same application code can run on whichever extension is available in a given environment.

As one of the most widely adopted PHP image libraries, it’s a common dependency in Laravel and other PHP frameworks for tasks like resizing uploads, generating thumbnails, watermarking, and format conversion, including support for animated image formats across all drivers.

What You Get

  • An ImageManager that lets you swap between GD, Imagick, or libvips without changing application code
  • A fluent Image API for resizing, cropping, rotating, watermarking, and drawing text/shapes
  • Format encoders/decoders covering JPEG, PNG, WebP, AVIF, GIF (including animated), and more
  • A Colors module supporting multiple color spaces and palette extraction
  • Typography support for rendering text onto images with custom fonts
  • A driver-agnostic Interfaces layer so third parties can implement additional backends

Common Use Cases

  • Resizing and generating thumbnails for user-uploaded images in a web application
  • Adding watermarks or logos to images before serving or storing them
  • Converting between image formats (e.g. JPEG/PNG to WebP or AVIF) for optimized delivery
  • Editing animated GIFs (resize, crop) while preserving frame-by-frame animation
  • Extracting dominant colors or generating image-based text overlays for dynamic content

Under The Hood

Architecture The library follows a driver-abstraction pattern: ImageManager::usingDriver() selects a concrete driver class (src/Drivers/Gd/Driver.php or src/Drivers/Imagick/Driver.php) that implements a shared Interfaces contract, while operations on an Image instance are expressed as Modifiers objects executed through a ModifierStack, and file I/O flows through separate Decoders/Encoders pipelines per format — this keeps format- and engine-specific logic isolated from the fluent public API surface. Tech Stack Pure PHP 8.3+ targeting the Intervention\Image PSR-4 namespace, depending on intervention/gif for animated GIF support and optionally the ext-gd/ext-imagick/ext-exif PHP extensions depending on which driver is active; dev tooling includes PHPUnit 12, PHPStan for static analysis, and PHP CodeSniffer with Slevomat coding standards. Code Quality Tests are split into tests/Unit and tests/Feature directories (plus tests/Traits and tests/Providers helpers), run via phpunit.dist.xml, alongside a phpstan.dist.neon config enforcing static-analysis strictness — a testing and analysis setup consistent with a widely-depended-on library. API Design The fluent, chainable Image API ($image->scale(...)->insert(...)->encodeUsingFormat(...)) keeps common tasks to a few lines of code with named parameters for clarity, and the driver-agnostic design means switching from GD to Imagick requires no code changes beyond the ImageManager::usingDriver() call, which is a strong developer-experience win for portability across hosting environments.

Used by 6 apps in this directory

Other

Akaunting

Invoicing Finance

10,070

Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.

View details
98
Repo Health
73
Technical
63
Dependency
Updated yesterday
PHP
72%
MIT

Bagisto

Analytics · Ecommerce

27,983

Open-source Laravel eCommerce platform for building multi-vendor marketplaces, B2B stores, headless commerce, and AI-powered storefronts.

View details
93
Repo Health
75
Technical
69
Dependency
Built with
PHP72%
Blade22%
Updated today
PHP
48%
AGPL 3.0

Crater

Invoicing Finance

8,341

Open source invoicing and billing platform for freelancers and small businesses — create estimates, track expenses, accept Stripe payments, and run recurring invoices from your own server.

View details
54
Repo Health
68
Technical
69
Dependency
Built with
PHP48%
Vue40%
Updated 2 years ago
PHP
85%
Other

Invoice Ninja

Invoicing Finance · Project Management

10,008

Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.

View details
97
Repo Health
83
Technical
62
Dependency
Built with
PHP85%
XSLT10%
Updated 2 days ago
Vue
49%
MIT

Mixpost

Marketing · Social Media

3,522

Self-host your own social media scheduler and publish to 11 platforms without subscriptions or data lock-in.

View details
51
Repo Health
64
Technical
71
Dependency
Built with
Vue49%
PHP44%
Updated 5 months ago
PHP
71%
MIT

Yaffa

Invoicing Finance

108

Self-hosted personal finance app for long-term financial planning with AI-powered transaction parsing and investment tracking.

View details
78
Repo Health
78
Technical
72
Dependency
Built with
PHP71%
Vue24%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search