lloricode / spatie-image-optimizer-health-check
These checks are where you can check if optimizer is installed on your server.
                                    Fund package maintenance!
                                                                            
                                                                                                                                        Patreon
                                                                                    
                                                                            
                                                                                                                                        www.paypal.com/donate?hosted_button_id=V8PYXUNG6QP44
                                                                                    
                                                                
Installs: 33 588
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/lloricode/spatie-image-optimizer-health-check
Requires
- php: ^8.2
 - illuminate/contracts: ^11.0|^12.0
 - spatie/laravel-health: ^1.19
 - spatie/laravel-package-tools: ^1.12.1
 
Requires (Dev)
- larastan/larastan: ^3.1.0
 - laravel/pint: ^1.14.0
 - orchestra/testbench: ^9.0|^10.0
 - pestphp/pest: ^3.7.4
 - pestphp/pest-plugin-arch: ^3.0.0
 - pestphp/pest-plugin-laravel: ^3.1.0
 - phpstan/extension-installer: ^1.3.1
 - phpstan/phpstan-deprecation-rules: ^2.0.1
 - phpstan/phpstan-phpunit: ^2.0.4
 - spatie/laravel-ray: ^1.35.1
 
README
When using laravel-medialibrary it uses image-optimizer under the hood, and probably this would not work if optimizer tools is not installed on you server. These checks are where you can check if optimizer is installed on your server.
Installation
You can install the package via composer:
composer require lloricode/spatie-image-optimizer-health-check
Usage
use Lloricode\SpatieImageOptimizerHealthCheck\ImageOptimizerCheck; use Spatie\Health\Facades\Health; # all optimizer Health::checks([ ImageOptimizerCheck::new(), ]); # specific optimizer use Lloricode\SpatieImageOptimizerHealthCheck\Optimizer; Health::checks([ ImageOptimizerCheck::new() ->addChecks(Optimizer::JPEGOPTIM), ]); # multiple Health::checks([ ImageOptimizerCheck::new() ->addChecks([ Optimizer::JPEGOPTIM, Optimizer::OPTIPNG, Optimizer::PNGQUANT, Optimizer::SVGO, Optimizer::GIFSICLE, Optimizer::WEBP, ]), ]);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.