I tried to load a jpg / png image from the storage folder, after which it will be damaged. This is my controller
public function download($filename) {
$headers = array(
'Content-Type: image/png',
);
return response()->download(storage_path() . '/'.$filename, 'final.png', $headers);
}
after opening it looks like this:

Even I used the core php script to load the fixed iam facing the same problem.
source
share