Laravel Image Intervention resize quality loss Laravel Image Intervention resize quality loss laravel laravel

Laravel Image Intervention resize quality loss


You're first resizing the image to a small format, then you take the small image and resize that to the original size again. If you reverse the order, you'll go from original size -> original size -> small size instead.

Personally, I usually prefer to redo the Image::make() call for every new image, just to make sure I don't screw something like this up along the way.


You can use "backup()" method to save the object's status and "reset()" method to return back to backup state:

// create an image$img = Image::make('public/foo.jpg');// backup status$img->backup();// perform some modifications$img->resize(320, 240);$img->invert();$img->save('public/small.jpg');// reset image (return to backup state)$img->reset();// perform other modifications$img->resize(640, 480);$img->invert();$img->save('public/large.jpg');

more info on this page:http://image.intervention.io/api/reset