@hanisirfan Hello there !, I am facing the same problem now. Did you find a solution to that?
Loading Assets For Laravel DOMPDF Usage
Can't load images or files from the public route of the app using asset() helper. I'm creating the PDF with the loadView() method. The view itself renders perfectly but the images and font files not being able to be embedded into the PDF.
The images is a background image of a div element being loaded with asset() helper for example {{ asset('storage' . $eventData->logo_first) }} (the file is located in the /storage route). Here is the example of the output from the asset() helper: background: url(my local host/storage/img/logo/1630132239-SeaJell-Logo.png).
Because of this, fonts also aren't being able to be loaded for the @font-face rule that I've set in CSS. I've also referenced all the .ttf file to a public route specifically /fonts route. I've also tried to access the image and font route and it works fine.
I've also tried by loading a random image from Wikipedia using the img element and it works fine.
Please or to participate in this conversation.