Using helpers is optional. You can just do it the normal way if you wish like in PHP.
Image in a blade
I store images in the directory projectname/storage/app/public/images. In regular blade files they are referred to in this way:
<a class="navbar-brand" href="{{ url('/home') }}">
<img src="/storage/images/Portal.jpg" class="img-fluid float-left" width="50" height="50">
Threshold - <small><small>QB as of {{session('qbupdate')}}</small></small>
</a>
I recently installed DOMpdf and noticed that the image file for the pdf blade was not found unless it was referred to in this way (no slash before storage):
<img src="storage/images/ch.png" class="img-fluid float-left" width="300">
Then I tried to place the image in the body of an email blade and neither of the previous methods worked. The only thing that worked was:
<img src="{{asset('storage/images/ch.png')}}" class="img-fluid float-left" width="300">
This kind of inconsistency can drive a developer up the wall . . .
You could use the asset helper everywhere?
Make sure your APP_URL is correct as this will be used if you create the pdf outside of a request cycle (eg in a queued job or scheduler)
Please or to participate in this conversation.