approached / laravel-image-optimizer

[deprecated] Image optimizer for laravel
MIT License
152 stars 33 forks source link

Not working on Laravel Homestead #7

Closed taliptako closed 8 years ago

taliptako commented 8 years ago

I'm trying to use this on laravel homestead its not working and i'm not getting any error

approached commented 8 years ago

Hi,

do you have installed some convert libraries. Like this ?

sudo apt-get install optipng pngquant pngcrush gifsicle jpegoptim
taliptako commented 8 years ago

Yes i installed all of them and i'm using optimizeImage instead of optimizeUploadedImageFile. Because i need to optimize all images on my filesystem.

approached commented 8 years ago

I think that is not really clear.

optimizeImage() is just for one imagefile

but

if you have upload class like this: Symfony\Component\HttpFoundation\File\UploadedFile; than you must use the other method.

This module currently doesn't suppert multifiles or a filepath. But feel free to implent this with a pull request.

taliptako commented 8 years ago

I'm using optimizeImage($filepath) like this with only one image filepath and this method should replace image in that filepath with new optimized image isnt it ?

approached commented 8 years ago

Yes, this image will be replaced.