All Projects → yasmuru → Ys Tinify Laravel

yasmuru / Ys Tinify Laravel

Licence: mit
Tinify API support with laravel

Labels

Projects that are alternatives of or similar to Ys Tinify Laravel

Laravel Mixins
A collection of Laravel goodies.
Stars: ✭ 33 (-8.33%)
Mutual labels:  laravel
Nova Laravel Update Card
Check if you're running the latest Laravel version right from your Nova dashboard.
Stars: ✭ 34 (-5.56%)
Mutual labels:  laravel
Laravel Weather
🌤️ A wrapper around Open Weather Map API (Current weather)
Stars: ✭ 36 (+0%)
Mutual labels:  laravel
Deapk
DeAPK is an open-source, online APK decompiler which lets you upload an APK and then decompile it to Smali or Java sources. It is built using Laravel, Vue.js, Bootstrap, FontAwesome, Pusher, Redis, MySQL, apktool, jadx and hosted atop Oracle cloud platform.
Stars: ✭ 33 (-8.33%)
Mutual labels:  laravel
Iot
IoT, 这是一个最小Internet of Things ,一个Internet of Things相关的毕业设计产生的一个简化的物联网系统。 。
Stars: ✭ 970 (+2594.44%)
Mutual labels:  laravel
Nideadmin
【未完成】NideAdmin - 基于 Vue.js + Egg.js 的微信小程序后台框架
Stars: ✭ 35 (-2.78%)
Mutual labels:  laravel
Nem Php
NEM Blockchain NIS API Wrapper and Software Development Kit for PHP
Stars: ✭ 32 (-11.11%)
Mutual labels:  laravel
Laravel Qrcode Ecommerce
This is a complete laravel project that handles qrcodes, payments, api/microservices, and ecommerce
Stars: ✭ 36 (+0%)
Mutual labels:  laravel
Laravel Package Top 100
对 Packagist 上打了 Laravel 标签 的扩展包进行整理,截止到现在 2016 年 8 月 9号,有超过 7176 个扩展包,以下是下载量最大的 100 个。
Stars: ✭ 971 (+2597.22%)
Mutual labels:  laravel
Validator
Client-side javascript validator library ports from Laravel 5.2
Stars: ✭ 35 (-2.78%)
Mutual labels:  laravel
Cms
Statamic 3: The Core Composer Package
Stars: ✭ 965 (+2580.56%)
Mutual labels:  laravel
Framework
The Lawoole framework
Stars: ✭ 33 (-8.33%)
Mutual labels:  laravel
Htmlcache
Laravel middleware to cache the rendered html
Stars: ✭ 35 (-2.78%)
Mutual labels:  laravel
Laravel Pg Extensions
Laravel extensions for Postgres
Stars: ✭ 33 (-8.33%)
Mutual labels:  laravel
Lynnhosting
Open Source, Web Hosting Automation built with Laravel
Stars: ✭ 36 (+0%)
Mutual labels:  laravel
Laravel Guided Image
Simplified and ready image manipulation for Laravel through intervention image.
Stars: ✭ 32 (-11.11%)
Mutual labels:  laravel
Laravel User Settings
Simple and persistent boolean settings per user
Stars: ✭ 34 (-5.56%)
Mutual labels:  laravel
Scrutiny
Ensure your laravel-based project is running in the correct server environment
Stars: ✭ 36 (+0%)
Mutual labels:  laravel
Nova Bar Metrics
A Laravel Nova tool for bar chart metrics and frequency distributions.
Stars: ✭ 36 (+0%)
Mutual labels:  laravel
Laravel Response Macros
Extra response macro's for Laravel
Stars: ✭ 35 (-2.78%)
Mutual labels:  laravel

ysTinify-laravel

Tinify API support with laravel

Latest Version on Packagist

Install

$ composer require yasmuru/ys-tinify-laravel

Add this to your config/app.php,

under "providers":

        yasmuru\LaravelTinify\LaravelTinifyServiceProvider::class,

under "aliases":

        'Tinify' => yasmuru\LaravelTinify\Facades\Tinify::class

And set a env variable TINIFY_APIKEY with your tinypng api key.

If you want to directly upload the image to aws s3, you need set the env variables of following with your aws s3 credentials.

    S3_KEY=
    S3_SECRET=
    S3_REGION=
    S3_BUCKET=

Examples

	$result = Tinify::fromFile('\path\to\file');


	$result = Tinify::fromBuffer($source_data);

	$result = Tinify::fromUrl($image_url);

	/** To save as File **/
	$result->toFile('\path\to\save');

	/** To get image as data **/
	$data = $result->toBuffer();
	$s3_result = Tinify::fileToS3('\path\to\file', $s3_bucket_name, '/path/to/save/in/bucket');

	$s3_result = Tinify::bufferToS3($source_data, $s3_bucket_name, '/path/to/save/in/bucket');

	$s3_result = Tinify::urlToS3($image_url, $s3_bucket_name, '/path/to/save/in/bucket');

	/** To get the url of saved image **/
	$s3_image_url = $s3_result->location();
	$s3_image_width = $s3_result->width();
	$s3_image_hight = $s3_result->height();

NOTE: All the images directly save to s3 is publicably readable. And you can set permissions for s3 bucket folder in your aws console to make sure the privacy of images.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].