Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Dicebear

Filament Dicebear Laravel Package

leek/filament-dicebear

DiceBear avatar provider for Filament panels, supporting all 31 DiceBear styles with caching, per-model customization, and self-hosted instances. Just register the plugin and provider to give users without custom avatars a generated DiceBear avatar.

View on GitHub
Deep Wiki
Context7

Filament DiceBear integrates the DiceBear avatar library into Filament panels, giving every user without a custom avatar a distinctive generated image. Register the plugin and provider once, pick a style, and avatars appear automatically across your panel.

  • All 31 DiceBear styles — from Adventurer to Thumbs, selected via enum or string
  • Fluent configuration — chain universal options like size(), radius(), scale(), rotate(), flip(), and backgroundColor()
  • Caching for fast, repeatable avatar rendering
  • Per-model customization to tailor avatars to individual records
  • Self-hosted support for private or offline deployments
Frequently asked questions about Filament Dicebear
How do I install leek/filament-dicebear in a Laravel Filament app?
Install it with composer require leek/filament-dicebear, then optionally publish the config file using php artisan vendor:publish --tag=filament-dicebear-config. In your panel provider, set DiceBearProvider as the default avatar provider and add DiceBearPlugin to the plugins array. From then on, any user without an uploaded avatar will render a DiceBear avatar automatically.
Which Laravel and Filament versions does filament-dicebear support?
The package is built for Filament v3 and later, which means Laravel 10 or newer and PHP 8.1+. It hooks into Filament's avatar provider abstraction, so it works on any panel in a supported installation. Projects still running Filament v2 would need to upgrade Filament before adding this package.
How do I change the DiceBear avatar style in Filament?
Call the style method on the plugin, passing either the DiceBearStyle enum or a plain string, for example DiceBearPlugin::make()->style(DiceBearStyle::Adventurer) or ->style('bottts-neutral'). Universal options such as size, radius, scale, rotate, flip and backgroundColor can be chained in the same fluent call. Anything you leave unset falls back to the published config file.
Can I use a different DiceBear avatar style per model or per user?
Yes. Beyond the global plugin defaults, you can customize avatars per model through configuration or by returning a style value from your model's avatar method, so admins, customers and teams can each get their own look. This lets you register the provider once while varying style, seed and size across the application.
How does caching work and how do I clear cached avatars?
Generated avatars are cached through Filament's cache system, which cuts repeated requests to the DiceBear API and speeds up panel rendering. Caching uses whatever driver you have configured, such as Redis or the file driver, so make sure it is set in your .env. When a user's seed data changes, clear the relevant cache keys or run php artisan cache:clear so avatars regenerate.
Can I self-host DiceBear with this package instead of using the cloud API?
Yes. Point the package config at your own DiceBear instance instead of the public API and the provider will request avatars from that endpoint. Self-hosting usually means running the DiceBear server with npx or Docker, and it is the usual choice when you want offline rendering or to avoid a third-party service dependency.
Do I need Node.js to use filament-dicebear?
Not if you use DiceBear's hosted API, which is the default path and requires no extra infrastructure. Node.js is only needed when you self-host the DiceBear server locally with npx or Docker. That setup is optional and mainly matters for offline usage or strict data-residency requirements.
How do I test that DiceBear avatars render correctly in my Filament panel?
Open a panel page for a record without an uploaded avatar and confirm the generated image URL resolves and matches your configured style. For automated tests, fake outbound HTTP calls or assert on the avatar provider output so your suite does not hit the DiceBear API. Clearing the cache between runs helps you verify avatars are regenerated with the expected style and options.
What are the alternatives to filament-dicebear for Filament avatars?
You can keep Filament's built-in default avatar provider with initials, use Gravatar or ui-avatars, or build DiceBear URLs yourself without a plugin. This package adds convenience on top of DiceBear: style presets, fluent configuration, caching and per-model overrides. If you only need simple initials, the built-in provider is probably enough.
Is leek/filament-dicebear actively maintained and safe to depend on?
It is a small, focused plugin that follows Filament's plugin and avatar provider APIs, with a test suite run through GitHub Actions. The main maintenance risk is Filament changing its avatar provider contract in a future major release, so pin versions and read changelogs before upgrading. Check the repository's releases and test status before adopting it.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route