Download the PHP package flixtechs-labs/laravel-bytepoint without Composer
On this page you can find all versions of the php package flixtechs-labs/laravel-bytepoint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flixtechs-labs/laravel-bytepoint
More information about flixtechs-labs/laravel-bytepoint
Files in flixtechs-labs/laravel-bytepoint
Package laravel-bytepoint
Short Description Bytepoint image optimization API client SDK for laravel
License MIT
Homepage https://github.com/flixtechs-labs/laravel-bytepoint
Informations about the package laravel-bytepoint
Bytepoint image optimization API client SDK for laravel
Optimize uploaded images on the fly with Bytepoint in Laravel. Fits nicely into your existing workflow
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
To use this package you to first to obtain an API token from Bytepont
Visit https://bytepont.flixtechs.co.zw and create an account
On the profile page at the bottom click on "generate token" and copy the token to your .env file as follows
Add another optional enviroment variable
After this, all you need to do is hook bytepoint into your existing workflow.
This package adds a fluent bytepoint()
helper to the UploadedFile
object which accepts an array options as arguments.
Currently you can only specifiy the resulting file type, more options coming soon!
list of accepted file types
- webp
- png
- jpeg
Just call bytepoint before you save the file storage or any other media library that you are using
Optimizing existing images
You can also optimize existing images using the Bytepoint facade
The parameters are as follows
- the file
$filePath
is the path to file you want to optimize $destinationPath
is the path to save the optimized file$fileName
is the name of the file, this is optional though$options
an array of options to tell bytepoint how to optimize the image, currently you can only set the resulting file to eitherwebp,jpeg,png
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Given Ncube
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-bytepoint with dependencies
guzzlehttp/guzzle Version ^7.4
illuminate/contracts Version ^10.0
spatie/laravel-package-tools Version ^1.14.0