anton-a46 / tinyfield
tinyPng
0.0.3
2022-01-22 19:29 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
- tinify/tinify: ^1.5
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2025-03-23 02:39:13 UTC
README
This is a laravel-admin
extension that integrates TinyPng
into the laravel-admin
form.
Compress your images when uploading with api TinyPng
Installation
composer require anton-a46/tinyfield
Then
php artisan vendor:publish --provider=anton-a46\tinyfield\TinyFieldServiceProvider
Configuration
In the env
file add TinyPng API KEY
TINY_PNG_KEY=XXXXXXXXXXXXXXXXXXXXX
Usage
Use it in the form:
$form->tinyField('content'); $form->tinyField('tinyMultipleField');
Support for original field methods is retained
$form->tinyField('content')->move('/uploader')->uniqueName(); $form->tinyField('tinyMultipleField')->thumbnail([ 'medium' => [800, null], 'small' => [400, null] ])->move('/img')->uniqueName()->removable();