Search code examples
laravellaravel-5.3

How display image in laravel 5.3


I store image in public folder now i want to display the image i give the path but image not show any one help me whats the wrong in my code

My image complete path is public/admin/product

<img src="public/admin/product/<?php echo $productr['image'];  ?>" height="30px" width="30px">

Solution

  • Laravel view files blade.php supports {{}} tags to display values.

    {{ $valueToBeDisplayed }}

    In your case, you can do like

    <img src="/admin/product/{{ $product['image'] }}" height="30px" width="30px" />
    

    Assuming image name is abc.png.

    Make sure you have that image in folder public/admin/product/abc.png