php-pngquant is available on packagist, so you can use this wrapper with composer in any PHP project or Frameworks like Laravel, Symfony etc.
To install the wrapper of pngquant for PHP with composer, execute the following command:
composer require ourcodeworld/php-pngquant
The previous command will install the latest version of the wrapper.
Usage
The installation and usage of this library with composer is pretty easy, just be sure that the autoloader is included and import the PNGQuant
class:
<?php
require __DIR__ . '/vendor/autoload.php';
use ourcodeworld\PNGQuant\PNGQuant;
// Read the All Methods area of the documentation
// To see all the options that this class offers
$instance = new PNGQuant();
And that's it!