I tried to use image intevention with laravel 5 to upload images and resize.. but i have this error message:
NotSupportedException in Driver.php line 18: ImageMagick module not available with this PHP installation.
installation: require intervention/image
config/app.php
'providers' =>[
'Intervention\Image\ImageServiceProvider']
'aliases' => [
'Image' => 'Intervention\Image\Facades\Image'
]
then my controller:
public function postUpload(){
//$imagen = Input::file('image');
$imagen = Request::input('imagen1');
// create an image manager instance with favored driver
$manager = new ImageManager(array('driver' => 'imagick'));
// to finally create image instances
$image = $manager->make('public/'.$imagen)->resize(300, 200);
}
then my view:
{!! Form::label('imagen1', 'Imagen principal' , ['class' => "col-md-4 control-label"]) !!}
<div class="col-md-4">
<input type="file" id="exampleInputFile" name="imagen1">
</div>
then..Publish configuration in Laravel 5:
php artisan vendor:publish -- provider="Intervention\Image\ImageServiceProviderLaravel5"
I dont know if i have to install ImageMagick, because i have the same problem to upload with GD driver.