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

Imagine Filters Laravel Package

zenstruck/imagine-filters

Adds a set of reusable image filters on top of the Imagine library, making common manipulations like resizing, cropping, thumbnails, and watermarking easier to configure and chain in PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package actually is. zenstruck/imagine-filters is a thin add-on to Imagine (the PHP image abstraction over GD and Imagick) that contributes extra filter classes on top of Imagine's built-in filter set (resize, crop, thumbnail, grayscale, etc.). The integration surface is small: each filter is typically a single class implementing Imagine\Filter\FilterInterface with an apply(Image $image) method, composed into a $imagine->filter(...) chain or registered as a named filter in a bundle. That small surface area is the single most important fact for a TPM: the package is inexpensive to replace, and its abandonment is therefore a low-severity problem if it is caught before it is baked into a rendering pipeline.

Verdict. Do not adopt as a dependency. Treat the repository as a reference implementation and source of MIT-licensed algorithms, not as a runtime component. With 2 stars, 0 dependents, a last release of 2014-12-05, and an archived repository, there is no community validation and no upstream. A score of 0.005 is consistent with the metadata: this is effectively a dormant personal utility.

Architecture fit. Conceptually clean — filters are stateless, composable, and driver-agnostic by design, which is exactly the right shape for a pipeline stage. Practically, the package is misaligned with any modern stack. A 2014 release targets PHP 5.x-era Imagine (the 0.6/1.0 line) and will almost certainly declare a Composer constraint that conflicts with Imagine 1.3+/1.5 and with any Symfony 5/6/7 application. Note also the vendor/name drift between the Composer name (zenstruck/imagine-filters) and the repository (kbond/imagine-filters), a historical packaging signal that makes provenance harder to audit.

Integration feasibility. Installing it as a live dependency is likely to require --ignore-platform-reqs, a Composer replace/alias shim, or a fork — all of which convert a trivial dependency into permanent build friction and a supply-chain exception. The realistic path is vendoring the handful of filter classes you actually need into application code, or reimplementing them against Intervention Image 3 or current Imagine.

Technical risk. High and concentrated in three areas: (1) Runtime — pre-PHP 7 syntax, absent type declarations, possible use of removed functions, and no PHP 8 compatibility testing; (2) Correctness — image filter math (blur kernels, color transforms, alpha handling) is subtle, and there is no evidence of a maintained test suite or golden-image fixtures, so behavior is unverified; (3) Security/lifecycle — archived in 2014, no security response path, no CVE monitoring, and an implicit expectation that you own it forever the moment you depend on it. A secondary risk is transitive: pulling this in may pin other abandoned packages.

Key questions.

  • Which specific filters are we actually consuming, and do any of them duplicate built-ins or liip/imagine-bundle filter sets?
  • Are we on Imagine or Intervention Image today, and which driver — GD or Imagick — is authoritative in production?
  • Do we have golden-image regression tests, or would a port be validated only by eyeballing output?
  • Is the behavior of these filters load-bearing for user-visible assets or internal thumbnails only?
  • Who owns the vendored fork, and what is the deprecation trigger for replacing it?

Integration Approach

Stack fit. Poor as a package, acceptable as vendored source. The filter classes are small, dependency-free units that drop cleanly into an existing Imagine pipeline or port to Intervention Image 3's custom-filter API with modest effort. The value is the algorithm, not the packaging.

Recommended path — port, don't install.

  1. Inventory. Grep the codebase and configuration for actual filter usage. In practice most projects use two or three of these filters; the rest are dead weight.
  2. Reimplement or vendor. For each filter in use, either copy the MIT-licensed class into app/Image/Filters with updated syntax and type declarations, or rewrite against the current image library. Copying is faster and preserves byte-for-byte output; rewriting is cleaner long-term but requires output validation.
  3. De-risk the driver. Confirm behavior parity across GD and Imagick if both are ever active. Filter implementations frequently diverge on alpha channel handling and color profiles between drivers.
  4. Wrap, don't scatter. Expose the ported filters behind a single application-level service (e.g. ImagePipeline) so a future library swap touches one file.

Migration path and compatibility. If any code already depends on the package, the migration is: freeze the current version, capture reference outputs as fixtures, port, then run the fixtures in CI as an equality or perceptual-diff test before removing the dependency. Expect the port to be a day or two of work, not a project.

Sequencing. Audit → port → fixture-based validation → pilot on non-critical asset paths (background/queued thumbnail generation) → promote to user-facing paths → remove the Composer requirement and archive the internal fork with an owner and a review date. Do not schedule this as a big-bang migration; the blast radius is narrow and the work is easily parallelized.

Alternatives to evaluate first. liip/imagine-bundle filter sets, Intervention Image 3 built-ins, and Imagine's own filter library cover the overwhelming majority of real-world needs (watermarks, blur, sharpen, colorize, orientation). Confirm the gap before writing any code — there may be no gap at all.

Operational Impact

Maintenance. Ownership transfers entirely to your team on day one; there is no upstream to patch, no issue tracker that matters, and no release cadence. Budget a nominal ongoing cost for the vendored fork (dependency review, PHP upgrade compatibility) and treat it as internal code, not third-party code — it will not appear in your vulnerability feeds and will not be maintained by anyone else.

Support. None. No maintainer, no documentation beyond the 2014 README, no community to escalate to. Ramp-up is a half-day for the API and considerably longer for the domain: validating that a blur or color filter produces acceptable output requires image-processing judgment, not just code review. Plan for a reviewer who can assess visual quality.

Scaling. Image filtering is CPU- and memory-bound, and these filters are no exception. Large source images plus multi-step chains are the classic path to PHP memory exhaustion. Run filtering asynchronously behind a queue, cap input dimensions before filtering, and set explicit memory_limit headroom per worker. The package does not help or hinder here — but its age means it predates modern streaming and resource-efficiency practices, so assume naive in-memory full-image operations.

Failure modes to instrument.

  • Silent output drift after a PHP or image-library upgrade — mitigate with golden-image tests.
  • Driver divergence where GD and Imagick produce materially different results — mitigate by pinning one driver per environment.
  • Memory exhaustion on oversized uploads — mitigate with pre-flight dimension checks and queue isolation.
  • Class-not-found / constraint resolution failure during builds if the package is added as a dependency — this is the most likely first failure and the cheapest to avoid by not adding it.
  • Unhandled exception types from 2014-era code surfacing as 500s instead of graceful fallbacks — wrap invocations in a pipeline-level try/catch with a documented degraded-output path.

Bottom line for the roadmap. No adoption. Spend the small effort to port the specific filters in use, validate with fixtures, and keep the dependency count flat. The package's only durable asset is a few hundred lines of permissively licensed image math.

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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels