Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like Imgix and Cloudinary. Glide leverages powerful libraries like Intervention Image (for image handling and manipulation) and Flysystem (for file system abstraction).
© Photo Joel Reynolds
- Adjust, resize and add effects to images using a simple HTTP based API.
- Manipulated images are automatically cached and served with far-future expires headers.
- Create your own image processing server or integrate Glide directly into your app.
- Supports both the GD library and the Imagick PHP extension.
- Supports many response methods, including PSR-7, HttpFoundation and more.
- Ability to secure image URLs using HTTP signatures.
- Works with many different file systems, thanks to the Flysystem library.
- Powered by the battle tested Intervention Image image handling and manipulation library.
- Framework-agnostic, will work with any project.
- Composer ready and PSR-2 compliant.
Full documentation (except for the expanded parts) can be found at glide.thephpleague.com.
You can now keep the original image dimension (either width or height) when it is missing from the parameters by using od=1 parameter (od stands for original dimension). It is especially useful on cropping an image, because it lets you keep one dimension intact (default behaviour is to scale the missing dimension appropriately).
?w=100&od=1&fit=crop
Glide is available via Composer:
$ composer require adamale/glide
Glide has a PHPUnit test suite. To run the tests, run the following command from the project folder:
$ phpunit
Contributions are welcome and will be fully credited. Please see CONTRIBUTING for details.
If you discover any security related issues, please email jonathan@reinink.ca instead of using the issue tracker.
The MIT License (MIT). Please see LICENSE for more information.