league/glide
On-demand image manipulation server for PHP. Resize, crop, and apply effects via a simple HTTP API. Automatically caches transformed images with far-future headers, supports GD/Imagick/libvips, Flysystem storage, multiple response types, and signed URLs for security.
/images/profile.jpg?w=300&h=300&fit=crop).Expires headers, improving performance for static assets./images/*) and delegate to Glide’s Server instance.@glide helpers for templating (e.g., @glide($user->avatar, ['w' => 200])).Storage::disk('s3')->path()).glide:generate jobs)./images/* to Glide’s Server::outputImage(), potentially conflicting with existing routes. Solutions:
Route::get('images/{path}', [GlideController::class, 'handle'])).images.example.com).?w=10000). Must be enabled and validated in Laravel’s middleware.base_url or source paths could expose filesystem structure. Validate paths against allowed directories.Storage facade need custom Flysystem adapters?/img.jpg?w=300) or path segments (e.g., /img/300x300.jpg)?GlideMiddleware to intercept image requests and delegate to Glide’s Server.Server instance with Laravel’s container, configure source/cache paths, and bind to League\Glide\Server.Storage facade to abstract Flysystem adapters (e.g., Storage::disk('public')->path()).GenerateImageJob).@glide directives for templating (e.g., @glide($imagePath, ['w' => 200, 'fit' => 'crop'])).glide.resize('#image', { width: 300 })).Server in a Laravel service provider./images/* to Glide.nyholm/psr7 bridge.league/flysystem-aws-s3 adapter.filesystems.php for source/cache storage..env or config files.GLIDE_SOURCE_PATH).$server->setDebug(true)) for detailed error logs.storage:link for Laravel).base_url configuration.memory_limit) for Glide processes.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Source filesystem unavailable | Broken images | Fallback to local cache or CDN. Monitor storage health. |
| PHP extension (GD/Imagick) missing | Transformations fail |
How can I help you explore Laravel packages today?