Weave Code
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 on-demand PHP image manipulation library served over HTTP. Resize, crop, and apply effects with simple URL parameters, with automatic caching and far-future headers. Works with GD, Imagick, or libvips and Flysystem storage.

View on GitHub
Deep Wiki
Context7

layout: default title: Responses

Responses

In addition to generating manipulated images, Glide also helps with creating HTTP responses using the getImageResponse() method. This is recommended over the outputImage() method, since it allows your application to handle the actual output of the image.

However, the type of response object needed depends on your application or framework. For example, you may want a PSR-7 response object if you're using the Slim framework. Or, if you're using Laravel or Symfony, you may want to use an HttpFoundation object. To use the getImageResponse() method you must configure Glide to return the response you want.

Response integrations

Vendor Message interface Adapter package
PSR-7 PSR-7 Included in base package
CakePHP Vendor specific league/glide-cake
Laravel HttpFoundation league/glide-laravel
Slim PSR-7 league/glide-slim
Symfony HttpFoundation league/glide-symfony
Zend PSR-7 league/glide-zend

Custom responses

If your particular project doesn't use PSR-7 or HttpFoundation, or if you'd like finer control over how your response objects are created, you can use your own response factories. Glide provides the ResponseFactoryInterface interface for this.

<?php

namespace League\Glide\Responses;

use League\Flysystem\FilesystemOperator;

interface ResponseFactoryInterface
{
    /**
     * Create the response.
     * [@param](https://github.com/param)  FilesystemOperator $cache The cache file system.
     * [@param](https://github.com/param)  string              $path  The cached file path.
     * [@return](https://github.com/return) mixed               The response object.
     */
    public function create(FilesystemOperator $cache, $path);
}
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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai