paramonovav / laravel-optimize-images
Optimize images command for Laravel 4
Installs: 63
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/paramonovav/laravel-optimize-images
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is auto-updated.
Last update: 2022-12-19 01:22:16 UTC
README
Artisan command for Laravel 4 to optimize your images using jpegoptim and optipng.
Note: Based on and inspired by Spir/ImageOptimize.
Installation
Require this package with composer:
composer require paramonovav/laravel-optimize-images
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
'Paramonovav\LaravelOptimizeImages\LaravelOptimizeImagesServiceProvider',
You need to publish the config from this package.
php artisan config:publish paramonovav/laravel-optimize-images
Installation "jpegoptim" and "optipng" on MacOS X
Installing with brew
brew install jpegoptim optipng
Installation "jpegoptim" and "optipng" on CentOS with yum
Installing with yum package manager
yum install jpegoptim optipng -y
Now you can run artisan command:
php artisan optimize:images
Note: Be CAREFUL optimized images override/replace the original images