2017 © Pedro Peláez
 

library image-optimizer

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

image

gtuk/image-optimizer

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

  • Sunday, July 24, 2016
  • by gtuk
  • Repository
  • 2 Watchers
  • 13 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

ImageOptimizer

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process., (*1)

This guide assumes you have mozjpeg, pngquant and gifsicle installed., (*2)

Installation

You can install this library with composer or include it manually in your project., (*3)

Quick start

 $optimizer = new Optimizer(
    array(
        Optimizer::PNGQUANT_PATH => '/usr/local/bin/pngquant',
        Optimizer::MOZJPEG_PATH => '/usr/local/bin/cjpeg',
        Optimizer::GIFSICLE_PATH => '/usr/local/bin/gifsicle'
    )
);

After this you can run the optimization process. If the optimization failed the method will throw an Exception, otherwise it returns TRUE., (*4)

$optimizer->optimize('example.jpg', 'example-optimized.jpg'));

The Versions

24/07 2016

dev-master

9999999-dev

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

php image optimization compression optimizer optimize compress mozjpeg pngquant image optimizer gifsicle

24/07 2016

1.0

1.0.0.0

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

php image optimization compression optimizer optimize compress mozjpeg pngquant image optimizer gifsicle