Asad's avatar
Level 1

Laravel image is not appearing on Browser

I am showing the user profile picture like this when i upload the profile picture

This is how i am trying to show the image in the Browser

            src="/storage/avatars/{{ $user->image }}"

this is appearing in the Console

        <img height="150px;" src="/storage/avatars/1_avatar1552869006.jpg" class="curve-circle">

It is showing that the Profile picture is coming to browser but why its not rendering in the browser

0 likes
4 replies
jlrdw's avatar
<img src="....

I use the asset helper. Like

<img src="{{ asset('assets/upload/imgdogs') . '/' . $row->dogpic }}" alt="" class="image">
Asad's avatar
Level 1

wait let me try this and see if tis working

nodenacci's avatar

Try src="{{ \Storage::url("/storage/avatars/$user->image") }}"

The quotes will just concatenate. if it doesnt use src='{{ \Storage::url("/storage/avatars/$user->image") }}'

munazzil's avatar

Your using correct path, Try as like below?

    <img   src="{{ asset('/storage/avatars/'.$user->image) }}" alt="" />

Please or to participate in this conversation.