voyager: Default avatar is broken for new users

Version information

  • Laravel: v5.6.26
  • Voyager: v1.1
  • PHP: 7.2

Description

When adding user to voyager, its default avatar is broken.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a new Laravel project
  2. Install Voyager without dummy data
  3. Add authentication scaffolding for Laravel, using php artisan make:auth
  4. Register new user, say with email johndoe@example.com
  5. Add admin privileges to this user using php artisan voyager:admin johndoe@example.com
  6. Go to /admin with the user logged in
  7. The requested file /storage/users/default.png does not exist

Expected behavior

A default avatar picture should appear

Screenshots

voyager

Additional context

I don’t know if it’s important but I’m using homestead as my web server.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 18 (10 by maintainers)

Most upvoted comments

I hear what you are both saying. But I believe Voyager should provide a default avatar picture when creating users without using the --with-dummy flag. If not, what’s the point of providing a whole set of icons as well? To me that’s an issue that needs to be solved.

Change the APP_URL in .env file APP_URL=http://voyager.test

The default user icons are only installed during the voyager:install --with-dummy command.

Agreed, and Voyager used to. It was accidentally moved, not intentionally

@slckym that is just wrong. The image just doesn’t exist, and changing the app-url to voyager.test will break everything (at least for him)

Did you change de .env file? I’ve got a similar issue, I wasn’t using the Homestead though. I had to change the APP_URL=localhost to APP_URL=127.0.0.1:8000 like the docs says.