Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Image Laravel Laravel Package

intervention/image-laravel

Laravel integration for Intervention Image that provides a service provider, facade, and publishable configuration file, letting you set the image driver and options once centrally instead of repeating them on every image manager call.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on image plumbing. This is the "buy" answer for the roughly 50–100 lines of service-provider, facade, binding, and config glue you would otherwise write and maintain. It justifies not staffing a bespoke image abstraction layer.
  • Standardization policy. One publishable config/intervention-image.php becomes the single source of truth for driver and defaults, so a platform team sets policy once (auto-orientation on, animation decoding, background color, metadata stripping) and every feature team inherits it instead of re-specifying per call site.
  • Privacy/compliance feature decision. The strip option removes EXIF on encode, which lets you commit to "we strip GPS and camera metadata from user uploads by default" as a config-level guarantee rather than per-endpoint code review.
  • Deferring the infrastructure/driver decision. GD (default, no extra extension), Imagick (format breadth and quality), and Vips (throughput/memory) are selectable via config, and the manager is injected as ImageManagerInterface. You can ship on GD and swap later as an env change, not a refactor — a materially de-risked roadmap item.
  • Feature scope for uploads. Avatars, thumbnails, responsive derivatives, WebP conversion, and on-the-fly resize endpoints fit into a normal sprint because facade + DI + response()->image() reduce each to a few lines.
  • Endpoint design tradeoff. The response macro supports streaming an encoded image straight out of a route (format and quality as parameters) versus writing derivatives to storage first. That's a real latency/cache/storage cost decision you can now prototype and measure rather than assume.
  • Upgrade sequencing. Version lines are coupled (package 4.x ↔ Intervention Image 4.x; 1.5.x is the legacy line), which forces an explicit plan for when the image stack moves in lockstep with the framework.
  • Onboarding and knowledge concentration. Laravel-native facade and DI mean any Laravel developer is productive on day one; no bespoke image knowledge locked in one engineer's head.

When to Consider This Package

Adopt when:

  • You're on Laravel 8+ and below the version where Laravel ships its own Intervention-based image integration (13.20), or you've deliberately chosen the standalone package over the framework's built-in.
  • You want config-driven driver selection and centralized defaults instead of constructing an ImageManager at each call site.
  • Your team already uses or plans to use Intervention Image and wants the Laravel wiring for free.
  • The DI ergonomics and response()->image() macro are worth one dependency to you.

Look elsewhere or skip when:

  • You're on Laravel ≥ 13.20 and using framework-native image handling. Release 4.1.0 exists specifically to resolve facade (image → intervention.image) and config (image.php → intervention-image.php) collisions with Laravel's own integration. Running both is a known sharp edge — pick one deliberately and write it down.
  • You need a media pipeline, not an image library: stored derivatives, CDN delivery, signed on-the-fly URLs, queued generation, focal points, crop UI. That's spatie/laravel-medialibrary, Glide, or a hosted service (Cloudinary/imgix). This package provides none of it.
  • Throughput or memory is the binding constraint. This is a thin wrapper; the driver and process model dominate. Consider Vips, worker offload, or a dedicated service.
  • You're not on Laravel — use intervention/image directly.
  • You store originals and never transform them; you'd be adding a dependency for nothing.

Watch-outs before committing:

  • Modest footprint (161 stars, 0 listed dependents) means limited third-party battle-testing. The wrapper is small enough to read in an afternoon — that's the actual mitigation.
  • A history of small integration-level fixes (console/response-macro registration in 1.5.3 and 1.5.6, config key correction in 4.1.1). Normal for glue code, but budget a version bump on framework upgrades.
  • Pin the matrix explicitly: package major ↔ Intervention Image major ↔ Laravel version. Don't let them drift.

How to Pitch It (Stakeholders)

For executives. A free (MIT), officially maintained Composer package that turns image handling — uploads, thumbnails, resizing, WebP conversion — into configuration instead of custom code. It removes a recurring build-from-scratch cost on every product surface that accepts images, centralizes image policy (including stripping location and camera metadata from user photos, a small compliance win), and lets us change the underlying image engine via config rather than a rewrite. Cost is one dependency and effectively zero license risk. The honest caveat: it is a thin convenience layer over a separate open-source library, and newer Laravel versions ship comparable image support themselves. So the decision is "which wiring do we standardize on," not "do we buy an image platform." We should choose one and state it explicitly, otherwise we end up with duplicate and conflicting image setup.

For engineering. composer require intervention/image-laravel, publish the config, and you're done. Inject ImageManagerInterface (or use the Image facade) and you get an app-wide-configured manager — driver, EXIF auto-orientation, animation decoding, background color, metadata stripping — without repeating constructor arguments. response()->image($image, Format::WEBP, quality: 65) collapses encode-and-return into one call. The surface is small and readable; the real capability lives upstream in intervention/image, so our version-pinning discipline matters more than the wrapper. Verify your Laravel version against the built-in image integration before adding this, and pin package-major to Intervention-major.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules
loco/loco
starfederation/datastar-php
yupmin/modern-phystrix
stephenjude/extended-artisan-commands
lumphp/laravel-macroable
lumphp/laravel-collections
lumphp/laravel-contracts
sermepa/sermepa
arkecosystem/fortify