php - Laravel image not downloading in the browser

what is wrong with my code? when I watch the preview in inspect element in the browser, I can see the image in the preview section. but the image is not downloading.
$name = $result['name'];
$path = $result['path'];
$disposition = HeaderUtils::makeDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT,
$name,
str_replace('%', '', Str::ascii($name)));
return \Response::download($path, $name, [
'Content-Type' => 'image/png',
'Content-Disposition' => $disposition
]);
browser response headers are here
Accept-Ranges: none
Cache-Control: public
Connection: close
Content-Disposition: attachment; filename=e7853e60982911eb912b2192bf4aa5360341.png
Content-Length: 5095
Content-Type: image/png
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: you must enable the openssl extension in your php.ini to load information from https://repo.packagist.org
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.