Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robyfirnandoyusuf/image-compressor
Easily compress images using PHP
https://github.com/robyfirnandoyusuf/image-compressor
Last synced: 4 days ago
JSON representation
Easily compress images using PHP
- Host: GitHub
- URL: https://github.com/robyfirnandoyusuf/image-compressor
- Owner: robyfirnandoyusuf
- License: mit
- Created: 2019-08-25T12:17:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-26T07:14:32.000Z (about 5 years ago)
- Last Synced: 2024-04-20T11:46:41.174Z (7 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP ImageCompressor
[![Issues](https://img.shields.io/github/issues/robyfirnandoyusuf/Image-Compressor)](https://github.com/robyfirnandoyusuf/Image-Compressor/releases)
[![Starts](https://img.shields.io/github/stars/robyfirnandoyusuf/Image-Compressor)](https://github.com/robyfirnandoyusuf/Image-Compressor/releases)
[![Total Downloads](https://img.shields.io/packagist/dt/robyfirnandoyusuf/Image-Compressor.svg)](https://packagist.org/packages/robyfirnandoyusuf/image-compressor)
[![LICENSE](https://img.shields.io/github/license/robyfirnandoyusuf/Image-Compressor)](LICENSE)A PHP Package to Compress Image.
## Requirements
PHP cURL Module Enable## Installation
You can install the package via composer:
```bash
composer require robyfirnandoyusuf/image-compressor
```
## Usage
```php
use ImageCompressor\ImageCompressor;
ImageCompressor::compress('x.jpg','good','/path/output');
```**parameter 1** : filename.jpg / .png
**parameter 2** : quality (normal,good,high,extreme)
**parameter 3** : output directory
###### Compression details at different levels.
Compression Mode
jpg
png
mozjpeg
pngquant
normal (Less compression, better image quality)
quality 85
speed 3
good **Recommended** (Balanced compression & image quality)
quality 80
speed 1
high (More compression & less image quality)
quality 70
speed 1
extreme **Not Recommended**(Most compression & lowest image quality)
quality 60
speed 1
## Tested On
OS : Ubuntu 16.04 LTS
PHP Version : PHP 7.3.3
Web Server : Apache2
## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Version
**Current version is 1.0.0** and still development.
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.
## Contact
If you meet any problem when using ImageCompressor, file a issue or contact me directly.
[Roby Firnando Yusuf](https://facebook.com/exploreourbrain)