hari dran
hari dran

Reputation: 115

img src not working to showing Images Laravel 8

i am beginner of Laravel 8. i creating simple project. but when i view the project images are not shown. View Page

Index.php

 <div>     
   <img src="{{asset('/images/chocolate-ice.jpg')}}"  id="Chocolate" class="photo" width="100" height="100" data-toggle="modal" data-target="#exampleModal">
   <b>Chocolate</b>
 </div>

enter image description here

Folder structure

Upvotes: 1

Views: 3830

Answers (1)

lagbox
lagbox

Reputation: 50481

If you want to use Blade your template/view must end in .blade.php. That is how the view system knows what view engine to use. When it is just .php it does not use the Blade compiler to parse the template.

Upvotes: 1

Related Questions