Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: implement new avatar providers #164

Merged
merged 6 commits into from
Mar 10, 2021
Merged

Conversation

ryangjchandler
Copy link
Member

This pull request adds support for custom implementations of AvatarProvider. The AvatarProvider is an object that is responsible for getting an avatar for a user.

By default, Filament will still use any uploaded avatars or avatars provided by getFilamentAvatar. If the avatar provided by these methods is null, it will fallback to the configured avatar provider.

Out of the box, Filament uses Gravatar as the default avatar provider but also provides one for ui-avatars.com (like Jetstream).

You can change the avatar provider used by modifying the filament.auth.avatar_provider configuration value.

Gravatar

'auth' => [
    'avatar_provider' => \Filament\AvatarProviders\GravatarProvider::class,
]

UI Avatars

'auth' => [
    'avatar_provider' => \Filament\AvatarProviders\UiAvatarProvider::class,
]

@ryangjchandler ryangjchandler changed the base branch from main to develop March 10, 2021 18:38
@ryangjchandler ryangjchandler added the enhancement New feature or request label Mar 10, 2021
@danharrin danharrin merged commit 4e26c9a into develop Mar 10, 2021
@danharrin danharrin deleted the feature/avatar-providers branch March 10, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants