Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

merrant's avatar

Storage and domPDF

Hi guys

I'm using barryvdh/laravel-dompdf & laravel 5.2 to generate PDFs, works great. Now the question is: All my users uploaded photos are in storage and I'm displaying them as usual:

                    @if($checkup->image->image3!=null)
                        @if(Storage::disk('checkups')->has($checkup->image->image3))
                            <img class="margin-bottom-10" width="100%" src="{{ route('view.checkup', ['filename' => $checkup->image->image3]) }}" alt="">
                        @endif
                    @endif 

I'd like to put that image on a PDF file now, but unfortunately same method does not work and I'm getting timeout error.

FatalErrorException in functions.inc.php line 859: Maximum execution time of 60 seconds exceeded

Has anyone tried to do something like this before? Maybe you could give me some pointers?

Thanks, Anthony

0 likes
2 replies
PaulS's avatar
PaulS
Best Answer
Level 4

It's been a while since I used DomPDF but from what I remember it needs the physical path to the image, not the web path. Try putting the full path , e.g. src="/var/www/myapp/storage/checkups/image.jpg".

1 like

Please or to participate in this conversation.