Download the PHP package avnsh1111/laravel-image-optimizer without Composer
On this page you can find all versions of the php package avnsh1111/laravel-image-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download avnsh1111/laravel-image-optimizer
More information about avnsh1111/laravel-image-optimizer
Files in avnsh1111/laravel-image-optimizer
Package laravel-image-optimizer
Short Description A Laravel package that automatically optimizes images uploaded through the application.
License MIT
Informations about the package laravel-image-optimizer
Laravel Image Optimizer
Laravel Image Optimizer is a package that provides an easy way to optimize and resize images in your Laravel applications.
Installation
You can install the package via composer:
Usage
To use the package, you need to create a model that uses the OptimizeImage trait. The trait provides a set of options for optimizing and resizing your images.
Here's an example of a model using the OptimizeImage trait:
Options
name_only: Set totrueif you want to store just the file name in the database. Set tofalseif you want to store the full path.base_path: The base path where your images will be stored.quality: The quality of the optimized image (from 0 to 100).width: The maximum width of the optimized image.height: The maximum height of the optimized image.keep_files: Set totrueif you want to keep the original image file when updating or deleting a record. Set tofalseif you want to remove the image file when updating or deleting a record.
Example
Here's an example of how to use the package to optimize and resize an image:
Testing
To run the tests, execute the following command:
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Avinash Rathod
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-image-optimizer with dependencies
spatie/image-optimizer Version ^1.6.4
illuminate/support Version ^6.0|^7.0|^10.0