zestic/glide-optimizer

An optimizer manipulator for Glide that uses spatie/image-optimizer package.

Fund package maintenance!
YannikFirre

dev-main 2024-10-11 19:51 UTC

This package is auto-updated.

Last update: 2024-10-11 20:01:43 UTC


README

Software License Packagist Version

This manipulator uses spatie/image-optimizer package to minify resources.

Forked from https://github.com/infinityweb/glide-optimizer

Installation

composer require zestic/glide-optimizer

Usage

$server = League\Glide\ServerFactory::create([
    'source' => 'path/to/source/folder',
    'cache' => 'path/to/cache/folder',
]);

$manipulators = $server->getApi()->getManipulators();
$manipulators[] = new Zestic\Glide\Optimizer\OptimizerManipulator();

$server->getApi()->setManipulators($manipulators);

For better optimization use imagick driver.