Answer the question
In order to leave comments, you need to log in
How to properly resize an image and save it in storage?
Greetings!
Tell me how to resize an image on upload and save it in Storage using the putFile() method?
$img = Image::make($this->file['tmp_name']);
$img->resize(1000, 1000, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
});
Storage::putFile(config('path_to_image'), $img->stream());
Call to undefined method GuzzleHttp\Psr7\Response::hashName()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question