How to show an UI Avatar on your profile?
Hello everybody.
How to show an UI Avatar on your profile?
I made a profile use App\Filament\Pages\Auth\EditProfile;
But I don’t understand how to display my ui avatar. Just withdraw, no uploading.
15 Replies
I added it to the model. What's next? How to show it now?
Well it will show if you have added it, have you filled the avatar url for the user?
So that in the show here, you mean add an edit here
You need a file upload component to upload one.
I don't fill in the avatar_url field in the database. This field is not there. I want to use automatic avatars https://ui-avatars.com/api/?name=a&color=FFFFFF&background=030712
If you want to use automatically, then change your function to return it from there...
I don't want to upload an avatar. I just want to display the avatar in the profile like in the panel on the top right.
But this is not a native solution. Filament has avatar providers. Default UI Avatar. How do I use this.
So you just want to render the filament avatar blade else where?
I just want to display an automatic avatar. Why is it so difficult.
It's not
Here it comes out. How can I also display an avatar but only on the profile page?
Or with less files, assuming you have $record = UserModel.
Thanks to all. Created a component /resources/views/components/userinfo.blade.php Added an avatar there. And in the profile I displayed View::make('components.userinfo'),