Tried to export an excel file through a Laravel blade but the issue exists when trying to add an image that is from external link not the same server (it's from google storage) the image is accessible through browser
The error is:
PhpOffice\PhpSpreadsheet\Writer\Exception File URL does not exist
Also, tried to get base64 and also didn't work
$type = pathinfo($url, PATHINFO_EXTENSION);
$data = file_get_contents($url);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
didn't work <img src='{{$url}}' style="height: 20px;" height="100px">
didn't work <img src='{{$base64}}' style="height: 20px;" height="100px">
CodePudding user response:
I solved it by temporally download the image into the server and use the path to the image on the server.