Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbehzad-bhz/tntcompression
with this package you can easily compress your image file (free) No quality loss
https://github.com/mbehzad-bhz/tntcompression
Last synced: about 1 month ago
JSON representation
with this package you can easily compress your image file (free) No quality loss
- Host: GitHub
- URL: https://github.com/mbehzad-bhz/tntcompression
- Owner: mbehzad-bhz
- License: mit
- Created: 2021-08-31T18:53:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-10T17:51:08.000Z (almost 3 years ago)
- Last Synced: 2024-04-19T23:03:32.795Z (9 months ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TenetUp-Compression
with this package you can easily compress your image file (free) No quality loss
> **NOTE:** These instructions are for the latest version of Laravel.
[![License](http://poser.pugx.org/tenetup/zarinpal/license)](https://packagist.org/packages/tenetup/zarinpal)
* [Installation](#installation)
* [Example](#Request)
* [Copyright and License](#copyright-and-license)[![JetBrains](https://tenetup.com/tenetup.png)](https://tenetup.com)
## Installation1. Install the package via Composer:
```sh
$ composer require tenetup/compression
```2. Register The package in your config/app.php
A. set in Providers -> TenetUp\Compression\CompressionServiceProvider::class,
B. set in Aliases -> 'Compression' => \TenetUp\Compression\CompressionFacade::class,
## Example
```php
$filename = storage_path('app/public/1.jpeg');
$result = Compression::compressImage($filename);
$content = file_get_contents($result->optimizeFile);
Storage::disk('public')->put('1.jpeg', $content);
```
> we just send your local image file after that you can save where you likesample response
```php
{
"data": null,
"message": "success upload",
"error": false,
"optimizeFile": "http://compression.tenetup.com/showFile?filename=1.jpeg"
}
```## Copyright and License
[tenetup-Compression](https://github.com/mbehzad-bhz/tntCompression)
was written by [majid behzadnasab](https://github.com/mbehzad-bhz) , [pooria noruzi](https://github.com/pooria-noruzi) and is released under the
[MIT License](LICENSE.md).Copyright (c) 2021 TenetUp Company