Laravel 4 HTML images
Solution 1
The laravel search the image in the public folder, then you should have a file public/images/DRCSportslogo.png
{{ HTML::image('images/DRCSportslogo.png', $alt="DRCSports", $attributes = array()) }}
Solution 2
Try
<img src="{{asset('images/DRCSportslogo.png')}}" alt="DRC Sports Race Management" id="DRCS-logo" />
Solution 3
There is no difference what you input there it can be .jpg, .png or even .exe or any other file on system.
You can see that in api page : L4 API HTML::image
Only thing i can suggest is to browse directly to the image you want to reach. In my experience sometimes ftp clients make false uploads (empty png files). That could be the case.
Rachael
Education: Full Sail University Degree: B.A. Web Design and Development
Updated on July 09, 2022Comments
-
Rachael almost 2 years
My question is does Laravel accept PNG images or any other format beside JPG. What is happening is when I change my image to JPG it can find it, but as soon as I change it to PNG it no longer can find the image.
{{HTML::image('images/DRCSportslogo.png', 'DRC Sports Race Management', array('id' => 'DRCS-logo'));}}
I have this image formatted in both PNG and JPG in the same file directory so I know it's not the location of the file.