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

Laravel Glide Laravel Package

axn/laravel-glide

Integrate Glide image manipulation into Laravel with multiple server support and signed, secure URLs. Install via Composer, publish the config, generate a signing key, and serve resized images easily.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit axn/laravel-glide is a thin Laravel adapter over league/glide. The substantive image engine — resizing, cropping, watermarking, cache keying, signed URL generation — is Glide itself, which is mature and widely used. The wrapper contributes four things of actual product value:

  • ServerManager / GlideServer — named server definitions (source, cache, watermarks disk, driver, base_url, defaults, presets), enabling per-tenant, per-brand, or per-surface image pipelines from a single application.
  • Signed URLs with a generated GLIDE_SIGN_KEY, addressing hotlinking, gated media, and unauthenticated asset enumeration.
  • LaravelResponseFactory — proper Laravel Response and Base64 output instead of raw PSR-7 handling.
  • Presets — named transformation bundles (['p' => 'small']), the piece that actually reduces duplication in product code and keeps sizing consistent across web, API, and email surfaces.

The v4 line adds Glide::routes() with a generic invokable GlideController, so image routes of a server can be registered inside a module's or package's own middleware context. That is a meaningful architectural fit for modular monoliths and multi-tenant applications where image authorization should not be centralized.

Scope it correctly: there is no queueing, no image model/entity, no asset lifecycle, no cache-purge API beyond glide:clear, and no analytics. This is a delivery mechanism, not a DAM. Treat it as a time-to-market accelerator for on-demand derivatives, not a media platform.

Integration feasibility Low. composer require, publish config, php artisan glide:key-generate, define disks, define servers. A working vertical slice on an existing Laravel app with local/S3 disks configured is realistically under a day. Hard prerequisites:

  • GD or Imagick present in every runtime that serves or generates images — including queue workers, CI, and any container that renders emails or PDFs.
  • A registered, writable cache disk sized for derivative growth.
  • A 128+ character signing key stored in a secrets manager. Note that glide:key-generate appends to .env; that is a developer convenience, not a production secret-management strategy.

The binding constraint is version posture. v4.x requires PHP 8.4+ and Laravel 13; v3.x requires Laravel 12+; v2.2.1 is the last line supporting Laravel 10/11. A team on Laravel 11 is pinned to a branch that is no longer receiving features — that is a roadmap constraint, not just a build constraint.

Technical risk

  • Bus factor and adoption. 10 stars, 0 dependents, single-agency maintainer (AXN Informatique). Zero dependents means effectively no third-party production validation. The strongest counter-argument is replaceability: the package is small, and a parity reimplementation against league/glide directly is roughly 3–5 engineer-days because Glide does the hard part. Low switching cost is the reason this is a defensible dependency at all.
  • Release integrity. The 4.0.0 tag shipped pointing at 3.1.1 code and had to be republished as 4.0.1. That is a process-control signal. Pin exact versions, verify tag contents, and prefer commit-hash constraints over floating ranges.
  • API stability. 3.0.0 relocated and renamed the facade on a five-class package. Treat the public surface as liable to move; wrap it.
  • Supported-version cliff. Following the package's floor couples your framework upgrade cadence to a maintainer's cadence. If they pause, you inherit the upgrade work.
  • Documentation. README is deliberately minimal and defers to docs/, which is French-language (Savane). Workable internally, a friction point for audits, onboarding, and vendor due diligence.
  • Signed-URL key lifecycle. Config exposes one sign_key per server with no documented rotation window. Rotating invalidates every URL already issued — a real problem for cached CDN URLs, emails, and third-party embeds.
  • Cold-cache CPU. On-demand transformation runs in the request path. A cache flush, a new preset, or a traffic spike on an uncached variant produces a thundering herd against GD/Imagick.

Key questions

  1. Which driver — GD or Imagick — and is the chosen extension present in every runtime, with a verified image-processing smoke test in CI?
  2. What is the cache disk, and is it shared across all app nodes? Is a CDN in front, and does it honor the same cache headers?
  3. Who owns signing-key generation and rotation, and what is the acceptable invalidation blast radius when it rotates?
  4. Do we need pre-warming for high-traffic presets, or is cold-transform latency inside the image SLO?
  5. Is the fallback path direct league/glide, an in-house fork, or a SaaS image CDN — and who is named as the owner of that decision?
  6. What is our tenancy model — one server per tenant, or shared servers with disk-level isolation?

Integration Approach

Stack fit Adopt only if the application is Laravel and on the matching version line: Laravel 13 / PHP 8.4 for v4, Laravel 12 for v3, Laravel 10/11 for the frozen 2.2.x line. If the product needs CDN-edge transformation, AI enhancement, video, or full asset lifecycle tooling, stop — use a managed provider. If images are static or pre-generated and no real variant demand exists, direct league/glide or even pre-generated derivatives is simpler and lower-risk.

Migration path Three realistic entry points, each with a different first step:

  • From ad-hoc intervention/image calls in controllers — highest value. Replace inline resize calls with preset-driven Glide::url() / Glide::imageResponse(), and move disk resolution into server config. Lowest risk because behavior is already understood.
  • From a SaaS image CDN — keep the CDN. Use this package as origin behind it. This preserves the CDN's edge caching and format negotiation while removing per-transform vendor cost and giving you the transformation logic in-repo. Do not rip out the CDN in the same release.
  • From pre-generated derivative trees — run both paths in parallel per surface, compare output dimensions and quality, then cut over per feature rather than globally. Pre-generation jobs can remain as a warm-cache step.

Compatibility

  • Do not let Glide:: calls spread through controllers and Blade. Introduce an internal ImageUrlBuilder / ImageService adapter that owns URL shape, preset names, and signing. That adapter is your exit ramp and the single place to change if the package is forked or replaced.
  • The signed URL format is a public contract. Once URLs ship in emails, sitemaps, mobile clients, or third-party embeds, the shape is effectively frozen. Define the URL schema deliberately before launch, not after.
  • Pin exact versions in composer.json, commit composer.lock, and review upstream releases on a defined cadence rather than auto-updating.

Sequencing

  1. Spike (1–2 days). One server, one disk, three presets, signed URLs on and off. Validate GD/Imagick in the container and CI, and measure cold-transform and warm-cache latency.
  2. Adapter + pilot surface (1 sprint). Build the internal image adapter, define the preset catalogue with design, and ship one surface — avatars or product thumbnails, not everything.
  3. Harden. Cache-disk sizing, CDN/cache headers, failure logging and fallback placeholder behavior, key stored in the secrets manager, glide:clear wired into any deploy or content-invalidation runbook that needs it.
  4. Expand by surface. Each additional server (tenant, brand, bucket) is a config change plus an authorization review of the route middleware context. Re-evaluate the build-vs-buy decision at each expansion; if the surface count keeps growing, that is the signal to reconsider whether a managed service is cheaper than owning the pipeline.

Operational Impact

Maintenance Low code-touch, non-trivial dependency-touch. The package itself rarely changes, but you inherit three maintenance obligations: framework-upgrade coupling (the maintainer's cadence gates yours), a pinned version you must consciously bump and re-test, and a fork plan you should document before you need it. Assign a named owner for upstream release review. Budget roughly one engineer-day per quarter for version review and one to two days per Laravel major upgrade, plus the actual Laravel upgrade itself. The French-language docs mean you should write a short internal operating note — server definitions, preset catalogue, key location, cache invalidation — rather than rely on upstream docs during an incident.

Support There is no commercial support and no meaningful community. Internal support is the only support. That means: your on-call must be able to answer "why is this image 500-ing" without upstream help. The compensating control is that the failure domain is narrow — image delivery — and the code is small enough to read. Define an internal escalation path to the adapter owner, and keep a documented one-page fork procedure. If the organization requires vendor SLAs or long-term commercial backing, this package fails that gate and should not be adopted.

Scaling Scales horizontally with the app tier, with two caveats. First, transformation is CPU-bound in the request path: capacity planning must account for image requests separately from JSON requests, and cold-cache events are the peak-load scenario. Second, the cache disk is shared state — on multi-node deployments it must be object storage or a shared volume, not node-local disk, or you get inconsistent cache hits and duplicated storage. A CDN in front is close to mandatory for any real traffic volume; it absorbs repeat requests and makes the on-demand model economic. Presets and server defaults are the primary lever for reducing total derivative count — a disciplined preset catalogue is cheaper than any infrastructure change.

Failure modes

  • Missing GD/Imagick in one runtime (a worker, a CI image, a sidecar) — works in staging, fails in one code path in production. Mitigate with a startup or CI smoke test.
  • Cache disk full or unwritable — transformations fail or silently regenerate, causing CPU spikes and inconsistent responses. Alert on cache-disk utilization and transformation error rate.
  • Invalid or rotated signing key — a fleet-wide 404 for every previously issued URL. Rotation must be a planned, coordinated event with a documented blast radius, not an ad-hoc ops action.
  • Missing source file — v4 correctly returns 404 rather than an error, but the user-facing result is a broken image; the adapter should define placeholder or fallback behavior rather than surfacing 404s to end users.
  • Unknown server name — now throws InvalidArgumentException instead of ErrorException; a config typo becomes a hard failure. Validate server names at boot in non-production.
  • Cold-cache thundering herd after a cache clear or a new preset rollout — mitigate with pre-warming for high-traffic variants and staged preset rollout.
  • Upstream abandonment — no security patches, eventual incompatibility with a Laravel major. Detectable via release-cadence monitoring; the remedy is the fork, which is cheap here.

Ramp-up Engineers familiar with Laravel need roughly half a day to be productive: the facade is idiomatic, and the config shape (source/cache/watermarks disks, driver, base_url, defaults, presets) is self-describing. The ramp-up cost is not in the API but in the surrounding judgment — when to sign, which driver, how presets map to design tokens, and what the cache invalidation story is. Front-load that as a written internal convention (preset catalogue, naming, URL contract, key handling) so the package stays a thin delivery layer and does not become a fourth place where image logic lives. Design and content partners need one working session on the preset catalogue, since presets are the artifact that determines visual consistency across surfaces.

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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table