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.
Ship dynamic image variants without building an image pipeline. This package wraps league/glide in a Laravel service provider, so product features that need thumbnails, avatars, product galleries, CMS media, hero crops, or API-returned images can call Glide::url(), Glide::imageResponse(), or Glide::imageAsBase64() instead of pre-generating every derivative at upload time. That is a roadmap accelerator for any surface with user-visible media.
The real decision is build vs. buy vs. integrate, not "adopt this or not." The four options are: a custom image service, direct league/glide integration, this thin Laravel wrapper, or a SaaS image CDN (Cloudinary/Imgix). Position this package as a time-to-market lever over direct Glide integration — it buys you Laravel-native config, a facade, a response factory, multi-server support, and signed URLs on day one, and costs roughly 3–5 engineer-days to replace at parity if you walk away.
Security and access-control roadmap. Signed URLs backed by a generated GLIDE_SIGN_KEY let product decide whether media is public, gated, paid, or hotlink-protected — without custom signed-URL plumbing scattered across controllers. This matters for user-generated content, premium content, and any surface where an attacker could otherwise mint arbitrary transformation URLs.
Multi-tenant / multi-surface architecture. Named servers with per-server source, cache, and watermarks disks, driver, base_url, defaults, and presets let one application serve distinct image policies per brand, tenant, product line, or channel. That is an architectural decision point, not just a config detail: it determines whether a second product line needs its own media stack.
Consistency and design-system alignment. Presets (['p' => 'small']) are the highest-leverage feature for product. They move image sizing out of ad-hoc controller code and into a named catalogue that design and engineering can agree on. This is what actually kills the "inconsistent crops across web and API" class of bug.
Operational cost and cache strategy. Per-server cache disks, group_cache_in_folders, cache_with_file_extensions, temp_dir, and a glide:clear command give you levers on derivative storage and CPU. Treat savings as a hypothesis to validate with real traffic data, not a given.
Scope guardrail — state this explicitly in any roadmap doc. This is conventional transformation: resize, crop, fit, watermark, format/driver selection via GD or Imagick. It is not a DAM, CDN edge network, video pipeline, AI upscaling/style transfer, or asset lifecycle system. Filing it under "media platform" on the roadmap will create expectations it cannot meet.
Route ownership as a product decision. The new Glide::routes() plus generic invokable GlideController (route name glide.{server}) lets individual packages and modules register their own image routes inside their own middleware context. That supports modular monolith and package-driven architecture — a meaningful consideration if the roadmap involves splitting surfaces into installable modules.
Consider it when:
league/glide integration is simpler and carries less dependency risk.Look elsewhere or defer when:
docs/, which is written in French — a genuine friction point for audits, handover, and onboarding in non-Francophone organizations.Two diligence flags to raise before signing off:
sign_key per server with no documented rotation window — rotating it invalidates every URL already issued, including ones embedded in emails, cached HTML, or third-party integrations. Separately, 4.0.0 shipped with the tag pointing at 3.1.1 code on Packagist, requiring a republished 4.0.1. Both are manageable, neither is free.For executives:
"This is a small, MIT-licensed Laravel wrapper around league/glide, a mature and widely used image library. It would let us ship dynamic image variants — thumbnails, avatars, product images, watermarks, signed URLs — faster and with less custom code, and it supports multiple storage backends so we can serve different brands or tenants from one application. The caveat is adoption risk: the wrapper itself has very low public usage and a single maintainer. My recommendation is a contained pilot on one media surface with a named fallback — either direct league/glide integration, which we estimate at 3–5 engineer-days to reach parity, or a managed image CDN. This is a tactical accelerator, not a platform commitment, and the switching cost is low enough that the pilot is a cheap option to buy."
For engineering:
"What you get is a service provider, facade, ServerManager with named GlideServer definitions, presets, signed URLs with a glide:key-generate command, a proper LaravelResponseFactory, Glide::routes() with an invokable GlideController registered as glide.{server}, and a glide:clear cache command. Hard prerequisites: GD or Imagick in every runtime including queue workers and CI, a registered writable cache disk, and a securely stored signing key. The current major requires PHP 8.4+ and Laravel 12+ — Laravel 11 teams are on an unmaintained 2.2.x branch, so if we're not on 12/13 this conversation changes shape. Because the package is thinly adopted and its API has already moved once (3.0.0 renamed the facade), we should pin the version, wrap the facade behind an internal adapter so a swap to direct league/glide is a one-file change, log transformation failures, and document a signing-key rotation plan before launch. There is no queue integration and no cache-purge tooling beyond glide:clear — plan for those gaps."
For product/design:
"This lets us deliver consistent image sizes, reusable presets, watermarking, and secure image URLs without hand-preparing every variant or writing sizing logic per feature. The practical win is a preset catalogue we define together once — thumb, card, hero, zoom — and then reference by name everywhere, so web, app, and API stop drifting apart on crop and aspect ratio. Signed URLs let us decide per surface whether media is public or gated. The plan is to pilot on one media surface, lock the preset names with design before engineering wires them in, and confirm that cache behavior and URL expiry match what we want users to experience — particularly for images embedded in emails or shared links, where a rotated signing key would break them."
How can I help you explore Laravel packages today?