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

Statamic Placeholders Laravel Package

daun/statamic-placeholders

Statamic Placeholders lets you use dynamic placeholders in your Antlers templates, replacing them with values from entries, config, or custom resolvers. A lightweight addon for cleaner, more flexible content.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Release 5.0.0 moves this package from a pure dependency-graph change (4.2.0) to a release with application-facing output changes and a new extension point. Three things shift the architecture:

  1. Placeholder format default → WebP. Placeholders are emitted as data URIs, which means they are inlined into HTML, JSON API responses, emails, PDFs, and feed payloads. The package is no longer just "the thing that makes images during upload"; it now controls a byte-level contract that downstream renderers consume.
  2. Custom Intervention drivers (e.g. libvips). The package now sits on top of Intervention's driver abstraction rather than implicitly assuming GD/Imagick. That is a genuine architectural improvement — libvips is dramatically more memory-efficient for large sources — but it turns driver choice into a supported, first-class decision that the platform team must own.
  3. Placeholder generation de-duplication. A performance/caching optimization with implied memoization or reuse semantics; useful, but it introduces a correctness question about cache invalidation and stale artifacts.

The package remains a natural fit for Laravel media pipelines. What changed is that 4.2.0's risk was concentrated at composer update time; 5.0.0's risk is concentrated at render time and in whatever consumes the emitted data URI.

Integration feasibility. Feasible, but this is now a two-decision release rather than a routine bump.

  • The WebP default is explicitly labeled breaking. Any consumer that assumed a stable placeholder MIME type or byte-identical output needs attention: <img src> is fine in modern browsers, but email clients (notably desktop Outlook), some PDF renderers, older Safari, and third-party services that ingest data URIs may not accept WebP. Base64 payload size changes too, which affects HTML weight on list views that render many placeholders.
  • libvips support is opt-in capability, not a migration. Nothing requires you to switch drivers. It is available if you want it, and it implies a new dependency (ext-vips or the corresponding Intervention driver package) plus a different output profile from GD/Imagick.
  • De-duplication is transparent by design and low risk, provided the cache key includes everything that affects the placeholder (dimensions, format, source identifier, package version). If it does not, you may retain pre-5.0 placeholders after the upgrade.

Technical risk.

  • Breaking placeholder output (high, but bounded). Highest-impact item in the release. Blast radius is the rendering surface, not the image-processing pipeline: emails, PDFs, legacy clients, external consumers, visual snapshot tests, and any contract tests asserting on data-URI content.
  • Dependency constraint still unresolved (high). The 4.2.0 question — does the package pin intervention/image to ^4.0 exclusively — remains unanswered by these notes, and a major version bump is the most likely moment for the package to drop v3 compatibility. Custom driver support deepens the coupling to Intervention's v4 driver API. Assume v4-only until composer.json says otherwise.
  • Driver heterogeneity (medium-high). Adding a supported libvips path means three viable drivers, each with different resampling, color handling, metadata behavior, and output. Mixed-driver fleets will produce divergent derivatives for the same input. This is the same failure mode flagged in the 4.2.0 assessment, now with a third axis.
  • Extension/environment drift (medium). libvips requires a system library, not just a PHP extension. Base images, CI runners, and production containers all need it before anyone opts in.
  • Cache/render staleness (medium). De-duplication plus a changed default format means previously cached placeholder artifacts may be reused unless keys are versioned.
  • Stranded v3 users (medium). Unchanged from before and now more likely to bite, since 5.x is the branch receiving features.

Key questions.

  • Is the WebP placeholder default configurable, and is there a documented rollback (config key, env var, or published config) to restore the prior format per-environment?
  • What was the previous default format, and is the change MIME type only or also dimensions/quality/byte content?
  • Does the emitted constraint on intervention/image remain dual-compatible with v3, or does 5.0.0 require v4 exclusively? Is there a maintained 4.x line for v3-bound applications?
  • Is libvips support officially tested/supported by this package, or "should work via Intervention"? Which Intervention driver package and system library versions are validated?
  • What exactly is de-duplicated — within a single request, across requests via cache, or both? What is the cache key, and is it invalidated on upgrade?
  • Are there any other breaking changes in 5.0.0 beyond the placeholder format (dropped methods, renamed config keys, changed constructor signatures)?
  • Is there an upgrade guide, or is the changelog the only artifact?

Integration Approach

Stack fit. Still standard Composer/Laravel: composer require, no service provider changes implied. The integration surface has widened in two directions — the output contract (placeholder data URIs) and the driver contract (GD/Imagick/libvips) — but neither adds framework-level configuration burden. Deployments remain conventional; libvips adoption, if pursued, is a container/base-image change rather than an application change.

Migration path.

  1. Read composer.json for the intervention/image constraint. This single fact determines whether 5.0.0 is an additive upgrade or a forced v4 migration. Do this before anything else.
  2. Search the codebase and templates for consumers of placeholder output: Blade partials, mail templates, PDF generation paths, JSON serializers, Open Graph image generation, and any frontend component that assumes a specific data-URI prefix.
  3. Decide the placeholder policy deliberately: accept WebP, or pin to the previous format via config if the package allows it. "We'll find out in staging" is not a policy for a breaking change consumed by email clients.
  4. Treat libvips as a separate, later work item. Do not bundle a driver change with a major upgrade; you will not be able to attribute output differences to the right cause.
  5. Run the golden-image regression suite from the 4.2.0 plan, extended with placeholder-specific assertions: MIME prefix, decoded dimensions, and byte hash for each placeholder variant your UI renders.

Compatibility. Verify: PHP floor and GD/Imagick versions (unchanged concerns), plus — if libvips is on the roadmap — libvips system library version and the Intervention driver package version pinned identically across web and worker images. Re-check the Laravel support matrix and whether any published config keys changed names in 5.0.0. Confirm that the placeholder change does not interact with CSP: if your img-src policy is narrow, data: must already be allowed, but the format change can also affect any CSP or proxy that inspects content types.

Sequencing.

  1. Dependency audit: resolve intervention/image constraints across the tree in a throwaway branch; confirm 5.0.0 installs.
  2. Inventory placeholder consumers before writing any code — this is the step that determines scope.
  3. Upgrade in a feature branch with the placeholder decision applied explicitly; run full test suite.
  4. Execute the extended regression suite: image derivatives plus placeholder output plus one end-to-end render of every surface that displays a placeholder (web list view, transactional email, PDF export).
  5. Staging deploy with production-representative assets and driver configuration; verify de-duplication behaves (no stale artifacts, no visible latency regression).
  6. Production rollout behind a flag or canary if placeholders are user-facing. Keep the previous lockfile revertible.
  7. Only then evaluate libvips as an isolated, benchmarked change.

Operational Impact

Maintenance. Neutral-to-positive. The explicit intervention/image requirement from 4.2.0 is now joined by an explicit driver abstraction, which is healthier than assuming a single hardcoded backend. The cost is that each upstream Intervention major — and each driver the team chooses to support — becomes an explicit decision point owned by this package. Budget recurring time for dependency archaeology; it does not go away.

Support. Expect a new, distinct ticket class after 5.0.0: "images not displaying" rather than "thumbnails look different." Symptoms cluster around WebP-incompatible renderers — email clients, PDF engines, older enterprise browsers — and are usually reported by end users rather than caught by monitoring. Prepare a triage note mapping symptom → consumer surface (email/PDF/web/external API) → required placeholder format, and keep the pre-5.0 package version deployable. If libvips is adopted later, add a second triage dimension: driver per environment.

Scaling. Two effects, in opposite directions:

  • Placeholder payloads shrink with WebP, which is a small win on HTML weight for placeholder-heavy views. Confirm this empirically rather than assuming — quality settings can offset the format gain.
  • De-duplication reduces redundant processing, which matters most on list/index pages that generate many placeholders per request. Watch for cache growth as the trade-off.
  • libvips, if adopted, is the real scaling lever: materially lower memory per concurrent transform than GD, which is the usual ceiling on large-source media pipelines. Validate on worst-case assets before opening traffic; do not adopt it mid-upgrade.

Failure modes.

  • Silent render failure in a specific consumer (high). WebP placeholder renders fine in the browser and breaks in an email client or PDF export. Monitoring stays green; the first signal is a user complaint or a broken transactional email.
  • Resolution failure at install time (high, safe). composer update aborts on an Intervention constraint clash — loud and recoverable.
  • Silent output drift in derivatives (medium). Unchanged from 4.2.0; still the failure mode that a golden-image suite exists to catch.
  • Stale cached placeholders (medium). De-duplication plus a format change can serve pre-upgrade artifacts after deploy. Verify cache key versioning.
  • Driver mismatch across the fleet (medium). Web nodes on GD, workers on Imagick, or a partial libvips rollout, producing divergent output for identical input.
  • Extension/library gap (medium). A missing GD/Imagick capability — or, later, a missing libvips — fails at the first transform, typically on a worker rather than at boot.
  • Stranded v3 users (medium). If 5.0.0 pins Intervention v4 exclusively and no 4.x maintenance branch exists, teams are left choosing between an unsupported package and a forced upstream migration.

Ramp-up. Higher than 4.2.0. Mechanics remain routine Composer work, but the semantic load has grown: engineers must understand (a) which Intervention constraint is being resolved and why, (b) the placeholder output contract and who consumes it, and (c) enough of Intervention's driver model to reason about GD vs Imagick vs libvips differences. Budget roughly a day for dependency archaeology and consumer inventory, plus a full regression cycle. The consumer inventory is the step most likely to overrun — the code is easy to find, the emails and PDF templates are not.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin