Intervention Image with Laravel 5.3 Storage

Posted 2 years ago by Swaz

I like how Laravel 5.3 handles file uploads:

$path = $request->file('avatar')->store('avatars');
// avatars/bf5db5c75904dac712aea27d45320403.jpeg

Is there any way to keep this functionality while using Intervention for image processing?

// This doesn't work, but something like...
$image = Image::make($request->file('avatar'));

$image->fit(250, 250, function ($constraint) {

$path = Storage::put('avatars', $image);

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.