Level 102
How about an url
<img src="{{ asset('logo.png') }}" style="width: 200px; height: 200px">
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am still working in development not in a deployed environment and using mac. I have the following code:
$pdf = PDF::setOptions(['isHtml5ParserEnabled' => true,
'isRemoteEnabled' => true,
'defaultFont' => 'sans-serif',
'chroot' => public_path('storage/e-signatures')])
->loadView('pdf.contract_pdf', compact('contract'));
$pdf->setBasePath($_SERVER['DOCUMENT_ROOT']);
return $pdf->download('disney.pdf');
it contiues to have error with: Undefined type 'PDF'.intelephense(1009) but able to generate the pdf.
however for the image I tried both code:
<img src="{{ base_path()}}/logo.png" style="width: 200px; height: 200px">
<img src="{{ public_path('logo.png') }}" style="width: 200px; height: 200px">
both of them does not work. In generated pdf I have: Image not found or type unknown
Please or to participate in this conversation.