I have an image on a page, I insert it as follows:
<img src="img/logo.png">
The image usually appears on pages with address
/ page
. But when the URL is in the format
/ page / subpage
the image appears broken. How can I solve this?
I have an image on a page, I insert it as follows:
<img src="img/logo.png">
The image usually appears on pages with address
/ page
. But when the URL is in the format
/ page / subpage
the image appears broken. How can I solve this?
The right thing would be for you to use a Laravel method for images.
It has two forms:
{{ HTML::image('img/logo.png') }}
Or
<img src="{{ URL::to('img/logo.png') }} />
These ways work on any page, as these methods take the public folder by default for images, scripts, and styles.