Description
Optimize PNGs, JPGs, SVGs and GIFs by running them through a chain of various image optimization tools
This package can optimize PNGs, JPGs, WEBPs, AVIFs, SVGs and GIFs by running them through a chain of various image optimization tools. Here's how you can use it:
use Spatie\ImageOptimizer\OptimizerChainFactory; $optimizerChain = OptimizerChainFactory::create(); $optimizerChain->optimize($pathToImage);
The image at $pathToImage will be overwritten by an optimized version which should be smaller. The package will automatically detect which optimization binaries are installed on your system and use them.
Recent Courses on Laravel Daily
[NEW] Laravel MCP Server: Practical SaaS Example
9 lessons
49 min
NativePHP Mobile v4 with SuperNative: Mini-Course
5 lessons
18 min
Mobile Apps: React Native vs Flutter vs NativePHP?
8 lessons
55 min