Download the PHP package walrussoup/laravel-shortpixel without Composer
On this page you can find all versions of the php package walrussoup/laravel-shortpixel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download walrussoup/laravel-shortpixel
More information about walrussoup/laravel-shortpixel
Files in walrussoup/laravel-shortpixel
Package laravel-shortpixel
Short Description Shortpixel integration for laravel 9+
License MIT
Homepage https://github.com/walrussoup/laravel-shortpixel
Informations about the package laravel-shortpixel
Shortpixel integration for laravel 9+
Makes using the shortpixel reducer api with laravel slightly less painful.
Archiving
Archiving this to move to BunnyCDN. It's cheaper, and their API for using the on the fly image optimization is only $9.99 a month - literally cannot beat those prices.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
Usage
I recommend setting a log channel specific to compression. I set this in logging & simply set the output to another log file.
Understanding The API... kinda
The Shortpixel API accepts the original configuration in it's entirety to keep track of compression results. If you are not using a long-running job
with callShortpixelAndWait()
you will need to store the full configuration somewhere. I recommend letting a job handle this via its serialization.
The other thing is keeping track of the original names. For the sake of keeping things consistent, I made some methods for these.
Job Example
This is how I use it. It could probably be better, but it works for my case since jobs can be retried later.
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
- JL
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-shortpixel with dependencies
guzzlehttp/guzzle Version ^7.5
illuminate/contracts Version ^9.0
spatie/laravel-package-tools Version ^1.13.0