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

Glide Laravel Package

league/glide

Glide is an easy on-demand image manipulation library for PHP with a simple HTTP API. It resizes, adjusts, and applies effects, caches images with far-future headers, supports GD, Imagick, and libvips, and works with Flysystem and PSR-7/HttpFoundation responses.

View on GitHub
Deep Wiki
Context7

Wonderfully easy on-demand image manipulation library with an HTTP based API.

Frequently asked questions about Glide
How do I install league/glide in a Laravel application?
Install it with Composer using composer require league/glide. Glide is framework-agnostic, so in Laravel you add a route or middleware that delegates image requests to Glide and configure a Flysystem source such as a Laravel Storage disk. You then request variants with query parameters like w, h, fit, and fm.
Does league/glide integrate with Laravel?
Yes, Glide is framework-agnostic and can be wired into Laravel through a route, middleware, or a standalone HTTP endpoint. It supports PSR-7 and HttpFoundation responses, which aligns with Laravel's HTTP layer. Flysystem compatibility lets you use Laravel's Storage facade for local, S3, or other cloud disks.
How do I secure Glide image URLs?
Glide supports HTTP signatures for securing image URLs, which is recommended for public-facing endpoints. Signing prevents users from requesting arbitrary manipulation parameters against your source images. Also validate configured source paths rigorously, because misconfigured paths can expose files outside the intended directory.
How does Glide cache manipulated images?
Glide automatically caches processed images and serves them with far-future expires headers, reducing origin load for image-heavy Laravel applications. There are no built-in cache invalidation event listeners, so purging is manual or event-driven using Laravel Storage events or cron jobs. If you use CDN caching, confirm purge tooling treats output format as part of the cache key.
Which Glide image driver should I use in production: GD, Imagick, or libvips?
libvips is the clearly recommended production driver for high-volume workloads, and in Glide 4.2.0 it became a first-class path with a vips shortcut in ServerFactory and CI coverage. GD and Imagick remain supported, but heavy effects such as blur=50 still strain GD. Note that php-vips is effectively Linux-only, so check your deployment environments.
Does Glide support JPEG XL output?
Yes, JPEG XL support is new in Glide 4.2.0, widening the output format matrix. You must explicitly decide whether JXL is emitted by default, opt-in via fm=jxl, or gated by an Accept header. Reflect that decision in cache keys and CDN rules so format variants are cached and purged correctly.
Is upgrading from league/glide 4.1 to 4.2 a breaking change?
Glide 4.2.0 is a semver minor release with no migration guide and no announced deprecations, so expect a version bump plus regression testing rather than re-architecture. It includes an Intervention Image v4 compatibility fix, which helps Laravel teams standardize on 4.2.0 instead of pinning back to 4.1.x. Verify your intervention/image constraint is v4-compatible before bumping in a shared dependency tree.
How do I invalidate Glide image caches in Laravel?
Glide has no built-in event listeners for cache invalidation, so you must purge manually or build event-driven purging with Laravel Storage events, cron jobs, or CDN purge APIs. Include the output format in cache-key and purge rules, especially after adding JPEG XL variants. Plan invalidation when source images change, not only when URLs change.
What are the performance and memory risks of using Glide?
The first request for a new variant triggers processing, so cold starts can be slow until the cache is warm. Heavy effects remain resource-intensive, and libvips is the safer production choice for high volume. Glide 4.2.0 shrinks large JPEGs on load when resizing, reducing peak memory, but non-JPEG sources and extreme dimensions still require sizing and memory_limit tuning.
What are alternatives to league/glide for Laravel image handling?
Glide is a self-hosted PHP library with an HTTP API similar to hosted image services like Imgix and Cloudinary. Hosted services can offload processing and caching but add an external dependency and cost. Staying with Glide keeps processing inside your Laravel stack and works with Flysystem storage, so compare options based on traffic volume, driver support, and CDN needs.
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.
likyly/sdk
tdt/input
coreation/php-shapefile
coreation/gisconverter
primix/widgets
primix/notifications
primix/actions
primix/tables
primix/details
primix/forms
primix/support
marcelgwerder/laravel-api-handler
firebrikdotcom/conveyor-laravel-broadcaster
kanata-php/conveyor-laravel-broadcaster
alish/short-message
sonrac/lumen-league-oauth2
pushery/sanctum-hardening-for-laravel
evanschleret/laravel-uuidable
yigit-serin/laravel-openvidu
adachsoft/command-executor-lib