Saving an Intervention Image instance into Amazon S3

Posted 3 years ago by SergioGregorutti


Im using Intervention Image package to create thumbnails, etc. And I want to save the file into a Amazon S3 bucket.

This gives me an error:

$image = Image::make($image)->widen(800);
Storage::disk('s3')->put($path.$file, $image);
fstat() expects parameter 1 to be resource, object given

I think that I can save the image on my public directory and then copy the file into the bucket.

But, is there a best approach to do this? Like create the image and then save it into the bucket?


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.