I had the same issue, the fully qualified domain was incorrect.
Does your domain and TLD match those in the APP_URL environment variable; Laravel 8 appears to use .test now, whereas I tend to use .dev still?
Hello, I tried to install Laravel8 and I have an issue with the user image one the profile page. When I upload an image and save it, it doesnt show.
I had the same issue, the fully qualified domain was incorrect.
Does your domain and TLD match those in the APP_URL environment variable; Laravel 8 appears to use .test now, whereas I tend to use .dev still?
Thanks for your answer. Yes it matches, i run it locally and here is the app_url : APP_URL=http://localhost
The image is successfully uploaded in storage/app/public/profile-photos The url path of the image in the browser is: http://localhost/storage/profile-photos/z6VKTGCJRrzZB2QcrJHGBaMKcGAgPpKIbKenz5YJ.jpeg
i ran the command : php artisan storage:link
but nothing changes, it still doesn't work.
check your app url is it http://localhost or http://localhost/your_app_name
When I try http:127.0.0.1:8000//storage/profile-photos/zKAzeElcGCDodmdnZWBW2q2nLeCgO8KfpqOHnMM7.jpeg it works.
When I change the APP_URL variable from "Localhost" to "127.0.0.1:8000/, then the url of the link is http://127.0.0.1:8000/user/http:127.0.0.1:8000//storage/profile-photos/zKAzeElcGCDodmdnZWBW2q2nLeCgO8KfpqOHnMM7.jpeg"
I can't make it display the right url
my app URL is http://127.0.0.1:8000/
What is the URL of the page that should show the avatar
it's http://127.0.0.1:8000/user/profile and on this page, the url of the image is http://localhost:800/storage/profile-photos/zVUs21sb3fLNOrlzIHDsdJK0tscbIiNOKtIvOkbz.jpeg
but it's not showing.
in the browser if I go to : http://127.0.0.1:8000/storage/profile-photos/zVUs21sb3fLNOrlzIHDsdJK0tscbIiNOKtIvOkbz.jpeg
i can see the image.
So your APP_URL should be http://127.0.0.1:8000
open tinker and enter
>>> User::find(1)->toArray()
what do you see? (use id for a user with valid image)
profile_photo_url is the path to the avatar
it works thank you for you help Snapey!! I've found my mistake.
when you install laravel, the default App_URL is Localhost.
I tried to replace it with http://127.0.0.1:8000 and I did it wrong. It was set to: http:http://127.0.0.1:8000 (two times http)
Sorry for the disturbing and thanks you very much for your help Snapey and M_Viper28 !!
just in case someone read this post later
you may have some problems when you install Laravel 8 with Jetstream
when your use laravel new blog.test --jet
in .env APP_URL=http://blog.test.test
for example your host is Windows 10
and you create a new homestead, and ready vagrant up
vagrant ssh to where you want create the project and run
composer global require laravel/installer
laravel new project-name --jet
end of the installation, you will see an error about symlink,
in the host (Windows 10), run as Administrators to use cmd , create the symlink
mklink /J "D:\your\project\public\storage" "D:\your\project\storage\app\public"
and in host (Windows 10) go to project folder (NOT in the Homestead) run
npm install && npm run dev
vagrant ssh to Homestead project folder, run
php artisan migrate
Enjoy!
I had the same issue because I forgot the 'storage:link' command.
Updating the Laravel Installer to the latest version ( ^4.0 at this time) may resolve many issue.
https://laracasts.com/series/whats-new-in-laravel-8/episodes/1
Setting .env with correct URL values and php artisan storage:link solves the problem for me.
having the same problem with profile-photos but cannot figure out the correct APP_URL path. Storage is linked to public/storage. In a fresh "laravel new l8 --jet", the default APP_URL=http://l8.test. I believe it used to be localhost or 127.0.0.1, same as DB_HOST. Using homestead macOS. Any input would be appreciated.
I finally got the photo-image to update. i deleted the public/storage directory in homestead and then ran the storage:link command again. a new symbolic link was created and voila!
To anyone having a similar issue using --jet and homestead.......
Please or to participate in this conversation.