league/glide
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
intervention/image | 2.7.2 | - | MIT | prod | |
league/flysystem | 3.27.0 | - | MIT | prod |
League/Glide is a highly efficient on-demand image manipulation PHP library that employs an HTTP-based API for operation. This utility makes the process of image adjustment, resizing, and applying effects to images quite straightforward. Its highlights include automatic caching and serving of manipulated images with far-future expires headers, support for GD library and Imagick PHP extension, and the ability to secure image URLs via HTTP signatures, among others. Majorly, it operates using powerful libraries such as Intervention Image for image handling and manipulation, and Flysystem for file system abstraction.
To use the library, you'll require to have Composer installed then install Glide as follows:
$ composer require league/glide
You can then utilize its functions as per your image processing needs within your app.
Given its HTTP based API, you can manipulate an image by making a HTTP get request with specific parameters. For instance:
// Assuming you have a setup like this
$server = League\Glide\ServerFactory::create([
'source' => 'path/to/source/folder',
'cache' => 'path/to/cache/folder',
]);
// You can then process an image like this
$server->outputImage('image.jpg', ['w' => 300, 'h' => 400]);
This would output 'image.jpg' resized to a width of 300px and a height of 400px.
The complete set of documentation for using League/Glide can be found at the official PHP League website glide.thephpleague.com. The documentation provides a comprehensive overview of the library, its API, and how to effectively use it in your projects for efficient image manipulation.