luova/imageoptimizer

Image Optimize in your Laravel aplication

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/luova/imageoptimizer

v1.0.3 2022-09-12 19:51 UTC

This package is auto-updated.

Last update: 2025-12-13 03:45:54 UTC


README

Symple Image Optimizer for laravel

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

Installation

composer require luova/imageoptimizer

Usage

1 ) if you are using Laravel before version 5.4, manually register the service provider in your config/app.php file

Luova\ImageOptimizer\ImageOptimizerServiceProvider::class,

2 ) Here's how you can use it:

    use Luova\ImageOptimizer\Optimizer;

    $optimizer = new Optimizer();
    // first parameter for image file path, second parameter for where you want save optimize image and third parameter for image qualify

    // the image will be replaced with an optimized version which should be smaller
    $info = $optimizer->optimize($file);
    // if you use a second parameter the package will not modify the original
    $info = $optimizer->optimize($file, $optimize_path);
     // if you use a third parameter for image qualify
    $info = $optimizer->optimize($file, $optimize_path,80);

Any query