Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

paramonovav/laravel-optimize-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimize Images

Latest Stable Version Total Downloads Latest Unstable Version License

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