Profile Picture
Filament Startify overrides the default profile picture provider, instead it uses its own UserAvatarProvider::class
.
Setup
You can choose between 'ui-avatar' or 'gravatar' as main profile picture provider in the filament-startify.php
config file.
/*
|--------------------------------------------------------------------------
| Default Avatar Provider (overrides filament)
|--------------------------------------------------------------------------
|
| Please define your avatar provider. Default is 'ui-avatar'.
| Options: 'ui-avatar' or 'gravatar'
|
*/
'startify_avatar_provider' => 'ui-avatar',
Configuration
You have also a bunch of settings you can play with, following described:
/*
|--------------------------------------------------------------------------
| Default Avatar Provider Settings
|--------------------------------------------------------------------------
|
| Please look inside our documentation for more information.
| Documentation:
|
*/
'startify_avatar' => [
/* If 'true' then Startify will override Filaments default UiAvatarsProvider::class */
'use_as_default' => true,
/* UI-Avatar Provider */
'ui-avatar' => [
/* User model field which is used for avatar generation */
'name_field' => 'name',
/* Color used as text color */
'text_color' => 'FFFFFF',
/* BG-Color if 'dynamic_bg_color' flag is set to false */
'bg_color' => '111827',
/* If set to 'true', provider will generate a dynamic color
based on the user name */
'dynamic_bg_color' => true,
/* Changing this colors will adapt the dynamic BG-Color */
'hsl' => [
'hRange' => [0, 360],
'sRange' => [50, 75],
'lRange' => [25, 60],
]
],
/* Gravatar Provider */
"gravatar" => [
/* Default email is used to get the right Gravatar */
'name_field' => 'email'
],
],
NOTE: If you don't want to use Startify's default avatar provider just set
'use_as_default' => false
in thefilament-startify.php
config file understartify_avatar
.