Laravel 4 HTML Images

My question is, is Laraval accepting PNG images or any other format next to JPG. What happens when I change my image to JPG, he can find it, but as soon as I change it to PNG, he can no longer 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 this is not a file location.

+6
source share
4 answers

laravel is looking for an image in a shared folder, then you should have the file public / images / DRCSportslogo.png

 {{ HTML::image('images/DRCSportslogo.png', $alt="DRCSports", $attributes = array()) }} 
+9
source

Try

 <img src="{{asset('images/DRCSportslogo.png')}}" alt="DRC Sports Race Management" id="DRCS-logo" /> 
+5
source

It makes no difference what you enter there, it can be .jpg, .png or even .exe or any other file on the system.

You can see this on the api page: L4 API HTML :: image

The only thing I can offer is to go directly to the image that you want to achieve. In my experience, sometimes ftp clients create false downloads (empty png files). It could be like that.

+5
source

Try to give permission to the "images" folder

-3
source

Source: https://habr.com/ru/post/946596/


All Articles