TALL Tales

How to fix Laravel Jetstream profile photo not showing

04 Oct, 2022

When I first set up Laravel Jetstream I found that my profile image wasn't showing correctly. Thanks to a post I found on StackOverflow the reason for this is probably one of two issues:

  • you haven't set up the storage:link
  • the APP_URL path in .env is wrong

Set up storage:link

The public disk is intended for files that are going to be publicly accessible. By default, the public disk uses the local driver and stores its files in storage/app/public.

To make these files accessible from the web, you should create a symbolic link from public/storage to storage/app/public.

To do this run the following in your CLI:

php artisan storage:link

Information taken from the Laravel docs.

APP_URL path

If the image is still not showing their your APP_URL path may be wrong. This is stored in your .env file. Change the default (or whatever it currently is to the URL of the live site).

e.g. from APP_URL=http://localhost:8000 to APP_URL=http://example.com

See the full question on StackOverflow.

Photo by Quentin Rey on Unsplash