Facehash
Generate unique, deterministic avatar faces for your Filament panels.
Author:
Saade
Documentation

Generate unique, deterministic avatar faces for your Filament panels. Drop-in replacement for default user avatars — same name always produces the same face. Pure SVG, no GD or Imagick required.
#Installation
composer require saade/filament-facehash
#Usage
Add the provider and plugin to your panel configuration:
use Saade\FilamentFacehash\FacehashPlugin;
use Saade\FilamentFacehash\FacehashProvider;
public function panel(Panel $panel): Panel
{
return $panel
->defaultAvatarProvider(FacehashProvider::class)
->plugins([
FacehashPlugin::make(),
]);
}
#Configuration
Customize the avatars using the plugin's fluent API:
use Saade\Facehash\Enums\Variant;
use Saade\FilamentFacehash\FacehashPlugin;
FacehashPlugin::make()
->size(40) // Avatar size in pixels (default: 40)
->variant(Variant::Gradient) // Variant::Gradient or Variant::Solid (default: Gradient)
->initial(true) // Show first letter of name (default: true)
->colors([ // Custom color palette
'#ec4899',
'#f59e0b',
'#3b82f6',
'#f97316',
'#10b981',
])
For more configuration options (routes, default overrides, etc.), visit the Facehash package documentation.
#Model Trait
For using facehash avatars outside of Filament panels (e.g. in Blade views, notifications), add the trait to your User model:
use Saade\FilamentFacehash\Concerns\HasFacehashAvatar;
class User extends Authenticatable
{
use HasFacehashAvatar;
}
This gives you:
$user->facehash_avatar_url // data:image/svg+xml;base64,...
Override which attribute is used as the avatar name:
use Illuminate\Database\Eloquent\Casts\Attribute;
public function facehashAvatarName(): Attribute
{
return new Attribute(
get: fn () => $this->email // use email instead of name
);
}
#Credits
- Facehash for Laravel — the underlying PHP/Laravel package
- Facehash by Cossistant — the original JavaScript library
#License
MIT
The author
CTO & Backend Engineer at a Brazilian startup. Creating top-tier technology for public sector applications, making information and services universally accessible.
From the same author
Autograph
A package to collect signatures.
Author:
Saade
Laravel Log
Read Laravel logs from the Filament admin panel.
Author:
Saade
FullCalendar
The most popular JavaScript calendar as a Filament widget.
Author:
Saade
Adjacency List
A package to manage adjacency lists.
Author:
Saade
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Data Lens
Advanced Data Visualization for Laravel Filament - a premium reporting solution enabling custom column creation, sophisticated filtering, and enterprise-grade data insights within admin panels.
Padmission