Category : intervention

I want to Make a rounded corner image in laravel intervention. Please help me out. $image = Image::make($user[‘profile_pic’])->fit(300, 300, function ($constraint){ $constraint->aspectRatio(); }); $image->encode(‘png’); $width = $image->getWidth(); $height = $image->getHeight(); $mask = Image::canvas($width, $height); // draw a white circle $mask->circle(280, $width / 2, $height / 2, function ($draw) { $draw->background(‘#fff’); }); $image->mask($mask, false); $img->insert($image, ‘top-left’, ..

Read more

I want to Make a rounded corner image in laravel intervention. Please help me out. $image = Image::make($user[‘profile_pic’])->fit(300, 300, function ($constraint){ $constraint->aspectRatio(); }); $image->encode(‘png’); $width = $image->getWidth(); $height = $image->getHeight(); $mask = Image::canvas($width, $height); // draw a white circle $mask->circle(280, $width / 2, $height / 2, function ($draw) { $draw->background(‘#fff’); }); $image->mask($mask, false); $img->insert($image, ‘top-left’, ..

Read more

I just start learning laravel voyager. I installed laravel voyager in my new laravel project and everything works fine but when I try to post with image and I am getting an error message like this – "InterventionImageExceptionNotSupportedException Reading Exif data is not supported by this PHP installation." I have tried changing APP_URL, clear config, ..

Read more

$intervention = new ImageManager(array(‘driver’ => ‘gd’)); $rutaImagen=$request[‘hotel-imagen’]->store(‘upload-mihotel’,’public’); $img=$intervention->make(public_path(“storage/{$rutaImagen}”))->fit(800,500); $img->save(); click to view the result ES:Pues como podrá ver en la imagen esto es lo que me esta fallando, en el tema local me esta yendo todo bien, funciona perfecto pero una vez pasado a producción en el servidor de Heroku me comienza a dar este ..

Read more

I want to resize my image and add white background but after running resizeCanvas method it is still the same. Where is the problem? I want to get a white-backgrounded 1000×1000 image but get a 1000×750 png $url = $record->original_image; $extension = pathinfo($url, PATHINFO_EXTENSION); $filename = $record->name.’.’. $extension; $file = file_get_contents($url); $directory = $record->image_folder_name.’/’.$filename; $originalImage ..

Read more

[This image of composer update command not working][1] [Following error occur while running the program][2] web.php <?php use IlluminateSupportFacadesRoute; use InterventionImageImageManagerStatic as Image; Route::get(‘/’, [AppHttpControllersHomeController::class, ‘index’])->name(‘home’); Route::get(‘/image’, function(){ $img = ImageManagerStatic::make(‘images/altroz13.jpg’) ->resize(400, 250) ->save(‘images/altroz13a.jpg’); }); [1]: https://i.stack.imgur.com/tc6Ad.png [2]: https://i.stack.imgur.com/oO7Bp.png Sourc..

Read more

I am creating a controller that saves photos to the /storage/ folder. To protect myself from submitting a bunch of large photos and not to style their CSS, I wanted to resize them using the Intervention / image library. Unfortunately, despite following the installation instructions directly from the documentation, several uninstallations and reinstallations of the ..

Read more

I want to pass image thumbnail in the different blade in many different sizes, I try appends in my model to return them but the source in my blade is unknown, how can i fix this? my blade: <img src="{{$item->tiny}}" alt="{{$item->title}}"> my model: <?php namespace AppModels; use IlluminateDatabaseEloquentModel; use Image; class Product extends Model { ..

Read more

$imagePath = (request(‘image’)->store(‘uploads’, ‘public’)); //dd($imagePath); $image= Image::make(public_path("storage/{$imagePath}"))->fit(1000,1000); $image->save(); auth()->user()->posts()->create([ ‘caption’=>$data[‘caption’], ‘image’=>$imagePath, ]); this is my code the $image variable is not getting anything and it push back the error "image source not readable" kindly help me in this. Thanks in Advance 🙂 Sourc..

Read more

I want to download an image from url and change it via Intervention Image library and then save it under storage. But when I run this code: $file = file_get_contents($url); $image = Image::make($file); //changes will be there Storage::put($filename, $image); and click the image under the storage, get this error: "an error occurred while loading the ..

Read more

I’m trying to upload multiple images in Laravel using Intervention image package, it works fine with single image, when i try to upload multiple images it show empty list. Postman request : enter image description here Controller function: public function updatePosters(Request $req ) { $category = Category::where(‘id’, $req->id)->first(); if ( $req->hasFile( ‘images’ ) ) { ..

Read more