awcodes / filament-gravatar
Replace Filament's default avatar url provider with one for Gravatar.
Fund package maintenance!
awcodes
Installs: 155 319
Dependents: 5
Suggesters: 0
Security: 0
Stars: 30
Watchers: 1
Forks: 4
Open Issues: 1
Type:package
pkg:composer/awcodes/filament-gravatar
Requires
- php: ^8.2
- filament/filament: ^4.0
- spatie/laravel-package-tools: ^1.15
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.7
- pestphp/pest-plugin-laravel: ^3.0
- pestphp/pest-plugin-livewire: ^3.0
- rector/rector: ^2.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2025-10-13 07:10:57 UTC
README
Filament Gravatar
Replace Filament's default avatar url provider with one for Gravatar.
Compatibility
| Package Version | Filament Version |
|---|---|
| 1.x | 2.x |
| 2.x | 3.x |
| 3.x | 4.x |
Upgrading from v2 to v3
If you are upgrading from version 2 to version 3, you will need to update the namespace anywhere you are using the plugin from Awcodes\FilamentGravatar to Awcodes\Gravatar.
Installation
First, install the plugin with composer.
composer require awcodes/filament-gravatar
Next, add the GravatarProvider to your panel.
use Awcodes\Gravatar\GravatarProvider; use Awcodes\Gravatar\GravatarPlugin; public function panel(Panel $panel): Panel { return $panel ->defaultAvatarProvider(GravatarProvider::class) ->plugins([ GravatarPlugin::make(), ]) }
Global Defaults
You can modify the global defaults by using the following methods on the GravatarPlugin.
use Awcodes\Gravatar\GravatarPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ GravatarPlugin::make() ->default('robohash') ->size(200) ->rating('pg'), ]) }
Additional Info
You can also use the Awcodes\Gravatar\Gravatar class by itself should you need to outside a panel.
Awcodes\Gravatar\Gravatar::get( string $email = null, int $size = 80, string $default = 'mp', string $rating = 'g', bool $asImage = false, array $attributes = [] );
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.