U
U
Uglik2016-04-03 18:40:54
Laravel
Uglik, 2016-04-03 18:40:54

Storage laravel and Intervention Image?

Hello
Please help me figure it out with Storage laravel. Created a separate disk in the uploads configurations put a test image picture.jpg there
// get the picture
$file = Storage::disk('uploads')->get(''picture.jpg);
//Make resize 300 by 300 eg
$img = Image::make($file);
$img->resize(300, 300);
// Write down the result
Storage::disk('uploads')->put('thumbs/pisture.jpg', $img);
And nothing happens. Tell me what I'm doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Silm, 2016-04-03
@Silm

image.intervention.io/api/encode

Storage::disk('uploads')->put('thumbs/pisture.jpg', $img->encode('jpg', 100));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question