Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 8 Jetstream profile-photos not showing

Laravel 8 and jetstream, is it really new?

I just tried installing and playing it in fortify but I can't really understand why my profile photo not showing a picture.

update-profile-information-form

<!-- Current Profile Photo -->
<div class="mt-2" x-show="! photoPreview">
<img src="{{ $this->user->profile_photo_url }}"
          alt="{{ $this->user->name }}"
          class="rounded-full h-20 w-20 object-cover">
</div>

.Env

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:6IJbdi+QYczKeLT7yOw3OgPsHucXn1KxVUb27hTQKpU=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000

config/filesystems

'public' => [
            'driver' => 'local',
            'root' => storage_path('/public/storage'),
            'url' => env('APP_URL').'/public/storage/',
            'visibility' => 'public',
        ],
like image 869
Khandoker Hirok Avatar asked Sep 26 '20 08:09

Khandoker Hirok


2 Answers

Is the profile picture stored successfully?

(Window) If yes, these are the steps I fixed it:

  • Delete the shortcut folder storage created at /project/public/
  • Use the command php artisan storage:link again
  • Refresh the webpage and it solved.
like image 66
Khandoker Hirok Avatar answered Oct 19 '22 09:10

Khandoker Hirok


i did this: delete (APP_URL) on filesystems.php and this solves my problem, the profile picture is not showing on jetstream

'public' => [
            'driver' => 'local',
            'root' => storage_path('app/public'),
            'url' => env('').'/storage',
            'visibility' => 'public',
        ],
like image 26
Mull Algibrhani Avatar answered Oct 19 '22 09:10

Mull Algibrhani