I am getting below error when generating a PDF in Laravel using barryvdh/laravel-dompdf package of laravel.
Image not found or type unknown
HTML
<html>
<head>
<style>
table
{
border-color: #000;
color: #000;
border-collapse: collapse;
font-family: sans-serif;
}
</style>
</head>
<body>
<table style="width: 100%; margin-top: 10px;" cellpadding="3" border="1">
<tr>
<td style="text-align: right; font-weight: bold; font-size: 14px; padding-left: 5px;">User Image</td>
<td colspan="4" style="height: 50px;">
<img src="/val/test/storage/images/profile_1611820816863.jpg" height="70">
</td>
</tr>
</table>
</body>
</html>
Level
$complete_html = '<above HTML>';
$dompdf = new Dompdf();
$dompdf->loadHtml($complete_html);
$page_size = 'A4';
$dompdf->setPaper($page_size, 'portrait');
$dompdf->render();
$file_name = 'test_dom';
$dompdf->stream($file_name.'.pdf', array("Attachment" => 1));
I have reviewed other post on this topic and set "RemoteEnable" as true in dompdf config file and restarted the server but still getting this issue.
Edit I have changed image path it is a shared folder path, not project or local path. Also, file and folder path both have full permission to read and write(777) is already given