I want to upload an image to storage and crop it later. with an extra request. but my image is everytime 0kb and empty? This is my code
$file = Storage::disk($this->_storage)->get($this->_path . '/' . $filename); $img = Image::make($file)->resize(300, 200); if (Storage::disk($this->_storage)->put($this->_path . '/crop/' . $filename, $img)) { return true; }
Hope somebody can help me.
If I were you, I would try this:
Check the $file variable is empty or not?
Check the manual about the Image::make needs the content of a file or the path to the file?
Store the file without resizing.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community