Glide
Intervention Image
Glide | Intervention Image | |
---|---|---|
7 | 8 | |
2,548 | 13,881 | |
0.1% | 0.3% | |
3.6 | 9.6 | |
3 months ago | 16 days ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Glide
-
Having issues with WebP compression
We use https://glide.thephpleague.com/. It's dead easy to crop and resize with it too.
-
Converting images to .webp
Best library for image manipulation is https://glide.thephpleague.com/
- Creating a package, looking for feedback and suggestions
-
How do you handle image optimization, resizing and thumbnail in Laravel?
A solution for self hosted in PHP is Glide: https://glide.thephpleague.com
-
ImageMagick (6.9) vs GD (2.2) on PHP 7.4 (in 2021): Pros & Cons in terms of Security, Performance, and Color Profile Support
You should check out Glide. It provides an easy to use RESTful API for dynamically transforming images on the fly, handles caching them in Flysystem automatically, is easy to integrate in most modern frameworks, and allows you to secure the endpoint via signed URLs, presets and maximum sizes.
-
Srcset and Sizes (2014)
This is some pretty powerful stuff. Here's a more information-dense and up-to-date rundown of srcset and sizes: https://bitsofco.de/the-srcset-and-sizes-attributes/
Notably, it shows how it's possible to use different images based on a portrait or landscape layout of the viewport, which OP doesn't cover. That's not always useful but it's good to know it's there when you might want to use it.
I was recently (well, several months ago) tasked with improving the Google PageSpeed scores on mobile for a site which has a lot of image-heavy pages. The end solution involved adapting all images to use a image with a WebP alternative for browsers that can show it (Google's tools like it when you use their near-proprietary image format; go figure), plus using srcset and sizes (which can be used on tags inside of tags as well as tags) plus a script which resizes and caches resized versions of large images based on URL parameters (basically an ersatz Glide [0]; I wish I had known it existed when I started). The end result severely reduced page weight for mobile visitors and was successful in raising our PageSpeed scores and appeasing my client.
[0]: https://glide.thephpleague.com
Intervention Image
-
The Spatie Media Vulnerability
If still not confident you can still with other packages for images, such intervention https://github.com/Intervention/image
-
File Previews in Modals?
Not sure of any package that handles that specific use case perse. But if you're thinking of showing a preview, and don't want to load the original file, take a look at an image handling library like intervention
-
How to add support for HEIC images with ImageMagick in PHP
Apple released a new image format called HEIC/HEIF, and it broke many apps that handle image processing. The PHP library Intervention Image caught up to it and added support for the new image format, but somehow, it isn't working at the time of this writing. So we had to come up with a solution.
-
ImageMagick (6.9) vs GD (2.2) on PHP 7.4 (in 2021): Pros & Cons in terms of Security, Performance, and Color Profile Support
Glide is actually built on top of Intervention so I'd start looking there. If Intervention has what you need but Glide doesn't, you can probably write your own custom manipulation.
- Is there a modern OOP image processing lib for PHP?
-
Alternative to the Intervention Image package for PHP8?
The Intervention Image package is incredibly powerful, however it hasn't been updated since early November 2020 and has open PRs for PHP 8 support for several months, with no response from any collaborators.
-
PHP easy image cropping?
If you use Composer I suggest this package: https://image.intervention.io/, it has a sleek API for cropping and resizing.
-
Most Useful GitHub repositories for Laravel
Intervention Image is a PHP image handling and manipulation library providing an easier and expressive way to create, edit, and compose images. The package includes ServiceProviders and Facades for easy Laravel integration.
What are some alternatives?
Imagine - PHP Object Oriented image manipulation library
PHP Image Workshop - ImageWorkshop is a PHP5.3+ library that helps you to manage images based on GD library
Image Optimizer - Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.
Image Hash - 🌄 Perceptual image hashing for PHP
GIF Frame Extractor - GifFrameExtractor is a PHP class that separates all the frames (and their duration) of an animated GIF
image - Manipulate images with an expressive API
GIF Creator - GifCreator is a PHP class that creates animated GIF from multiple images
ImageMagick - 🧙♂️ ImageMagick 7
Image With Text - Create images with embedded text using advanced typography
laravel-filemanager - Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.