Question: My images were working fine, but right now i have a problem with my storage directory.

Before they were going here :

[![enter image description here](https://i.stack.imgur.com/0bTei.png)](https://i.stack.imgur.com/0bTei.png)

But now they are going here :

[![enter image description here](https://i.stack.imgur.com/H4hwG.png)](https://i.stack.imgur.com/H4hwG.png)

My code Profile Controller :

```
        if($r->hasFile('profile_avatar')){
            Auth::user()->update([
            'profile_avatar' => $r->profile_avatar->store('public/avatars')
            ]);
        }

        if($r->hasFile('banner')){
            Auth::user()->profile()->update([
            'banner' => $r->banner->store('public/avatars')
            ]);
        }

        Session::flash('success', 'Perfil Atualizado com Sucesso!');
        return redirect()->back();
    }

```

This was working before, but right now it doesnt show any picture

```
 <img src="{{ Storage::url($user->profile_avatar) }}" width="400px" height="400px" style="border-radius: 50%; display: inline-block" alt="" class="unselectable">

```

Answer: 
Well, it's because you're doing it the wrong way.

If you really intended to define the **disk** in which you wanted to store your image files, you had to pass the *disk* name as the second argument of the `\Illuminate\Http\UploadedFile->store(...)` method.

[Specifying A Disk](https://laravel.com/docs/8.x/filesystem#specifying-a-disk)

```php
// Instead of: ❌
'profile_avatar' => $r->profile_avatar->store('public/avatars')

// Use this: ✅
'profile_avatar' => $r->file('profile_avatar')->store( 'avatars', 'public')

```

.

```php
// Instead of: ❌
'banner' => $r->banner->store('public/avatars')

// Use this: ✅
'banner' => $r->file('banner')->store( 'avatars', 'public')

```
use asset in laravel to fix the issue, ex :

```
{{asset('avatars/imagename.png')}}

```

instead of : storage method , while showing the picture.