use Intervention\Image\ImageManagerStatic as Image; $image = Image::make('path/to/image.jpg'); $image->resize(500, null, function ($constraint) { $constraint->aspectRatio(); }); $image->save('path/to/modified/image.jpg');
use Intervention\Image\ImageManagerStatic as Image; $image = Image::make('path/to/image.jpg'); $image->filter(new \Intervention\Image\Filters\ColorizeFilter('#704214', 40)); $image->save('path/to/modified/image.jpg');In both of these examples, we are using the Intervention Image package, which is a powerful image manipulation package that is built on top of PHP Image.