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

Core Laravel Package

dicebear/core

DiceBear core is the PHP engine behind DiceBear avatars. Pass any seed string and it returns a deterministic, customizable SVG avatar, so the same input always yields the same image. Multiple styles and a flexible API make it easy to add consistent profile pictures to Laravel apps.

View on GitHub
Deep Wiki
Context7

Unique avatars from dozens of styles — deterministic, customizable, vector-based.

Frequently asked questions about Core
How do I install dicebear/core in a Laravel application?
Install it with Composer using composer require dicebear/core. It is a framework-agnostic, PSR-4 namespaced package, so there is no service provider to register and no config file to publish by default. Most teams wrap it in a small AvatarService class and resolve that from the container so the library stays an implementation detail. No migrations or queue setup are required.
Which PHP and Laravel versions does dicebear/core support?
The package is framework-agnostic and has no Laravel coupling, so it works with Laravel 10 and 11 as long as your PHP floor satisfies the package constraint. The recommended baseline is PHP 8.1 or newer, but you should confirm the exact requirement in the package's composer.json against your app. Because there is no Laravel-specific integration layer, framework upgrades will not break it.
How do I generate a consistent avatar from a user's ID or email address?
Pass any string as the seed and dicebear/core returns an SVG avatar that is always identical for that input. You can use a UUID, primary key, or a hash of the email, which keeps the seed decoupled from your auth model and avoids schema changes. Pick one seed strategy and document it, because changing the seed later will change every existing avatar.
Is dicebear/core a real PHP port or does it shell out to Node?
The package is distributed on Packagist as a PHP library with PSR-4 autoloading, which indicates a native PHP implementation rather than a Node wrapper. That distinction is critical for deployability, so verify it against the repository source before committing to it. If it silently requires a Node binary, container images and shared hosting deployments become significantly more complicated.
Can dicebear/core output PNG or only SVG?
Output is an SVG string, so it is strictly vector out of the box. SVG is ideal for browsers and scales cleanly at any size, and it lets you skip image extensions entirely. If you need raster images for email clients, OG previews, or PDF reports, plan a separate conversion step with its own infrastructure rather than assuming it is included.
Does dicebear/core require GD, Imagick, or Intervention Image?
No. Because the package produces SVG markup rather than raster data, it sidesteps GD, Imagick, and Intervention Image completely. That meaningfully reduces the image-processing surface area in your application and avoids the extension availability issues common on minimal container images. You would only need those libraries if you add an SVG-to-PNG conversion step later.
How should I cache avatars for performance in Laravel?
Treat caching as a design requirement, not an optimization, especially if avatars are served from a public route. Generate the SVG once, store it on a disk or object storage, and serve it with long-lived immutable cache headers behind a CDN. A per-request generation endpoint with no cache is a hot-path hazard under real traffic.
Do I need to publish or bundle avatar style assets separately?
Styles may ship with the package or require publishing or additional style packages, so confirm this early in your spike. Check the repository and asset blob sizes before baking them into container images, since bundled style assets can be sizable. Resolve asset availability and loading paths before you build the service contract around a specific style.
How do I test avatar output and keep it stable across upgrades?
Generate avatars against a fixed fixture set of seeds and styles, then snapshot the SVG output in your test suite. Deterministic generation means a style update can silently change existing avatars for every user, so pin the package version. Also verify output parity with upstream JavaScript DiceBear for the same seed, style, and options, since parity is not guaranteed.
Is dicebear/core mature enough for production, and what are the alternatives?
Treat it as a scoped spike first: adoption is low (roughly 4 stars, 0 dependents), and the maintainer pool is small, though the MIT license makes forking a viable contingency. Pin the version, review the source, and wrap it behind an interface with a trivial initials-based fallback so the dependency is swappable. Alternatives include generating initials avatars yourself, Gravatar, or raster generation with Intervention Image.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect