Spatie Image Optimizer Health CheckJanuary 29, 2023
When using laravel-medialibrary, it uses an image-optimizer under the hood, and this probably would not work if optimizer tools are not installed on your server. These checks are where you can check if an optimizer is installed on your server.
You can install the package via composer.
composer require lloricode/spatie-image-optimizer-health-check
And now you can add this check to your check list.
use Lloricode\SpatieImageOptimizerHealthCheck\ImageOptimizerCheck; use Spatie\Health\Facades\Health; Health::checks([ ImageOptimizerCheck::new(), ]);
Also, you can set up what you want to check.
Health::checks([ ImageOptimizerCheck::new() ->checkJPEGOPTIM() ->checkOPTIPNG() ->checkPNGQUANT() ->checkSVGO() ->checkGIFSICLE() ->checkWEBP(), ]);
And that's it, you can also see this check on the spatie health check page.