image
image copied to clipboard
Camera upload picture rotate (I already tried everything in SO & GitHub solution too)
I tried every single solution but still rotate my images after camera upload.
$this->validate($request, [
'background-picture' => 'required|image|mimes:jpeg,png,jpg,gif'
]);
$file = $request->file('background-picture');
$filePath = 'images/background-picture/' . Hashids::encode($id) . '.jpg';
$image = Image::make($file->getRealPath());
$image->orientate();
$image->fit(720, 440);
Storage::disk('public')->put($filePath, $image->encode());
return redirect()->route('main');``