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

adhik13th's avatar

Image not found or type unknown

I have problem in my view image on PDF , in local its still work but on hosting this image cant dispay . My direktory folder like that

subdomain.web.com
   * assets
         +build
         +assets
          build 
          dist
 
          docs
 
          PDF
             -header.PNG  

i call image on my view like this :

 <header>
      <center>
          <img src="{{ public_path('assets/PDF/header.PNG')}}" style="width:720px;height:130px;"  >
      </center>
  </header>

i using public_path on my local in its still work , but on hosting its dont work.

i add storage_link on my route and run this

 Route::get('/foo', function () {
 Artisan::call('storage:link');
 });

but didnt work ? someone cant help or explain my miss code ? thank you

0 likes
1 reply
a4ashraf's avatar

@adhik13th

change your header tag code with following

<header>
      <center>
          <img src="{{ asset('PDF/header.PNG')}}" style="width:720px;height:130px;"  >
      </center>
  </header>

Please or to participate in this conversation.