renj1e / php-image-compress
There is no license information available for the latest version (dev-master) of this package.
PHP image compression script
dev-master
2019-06-06 05:45 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-04-06 18:47:43 UTC
README
Usage
use renj1e\phpImgCompress\CompressorIO; $files = []; $compress = new CompressorIO(); $compress->backup = true; // default: true. when it's true, create a directory and files will be copied to there before compressed. $files[] = '/path/to/source/image/file.jpg'; $compress->compress($files); // you can compress one file or get file list by a folder and compress. $files = $compress->findFolder('png|jpg|jpeg|gif'); $compress->compress($files);
Installation
Simply add a dependency on renj1e/php-image-compress to your composer.json file if you use Composer to manage the dependencies of your project:
composer require renj1e/php-image-compress
License
Minify is MIT licensed.