The seed decides the face. Give the same user the same seed and their avatar survives every rebuild of your fixtures, which is the difference between a user list that looks stable and one that reshuffles on every refresh.
What you can control
- Six visual styles, from geometric identicons to illustrated robots.
- Crop control — square, rounded or circular — applied by the provider rather than by your CSS.
- A seed prefix namespaces a batch, so team avatars stay distinct from customer avatars.
- The seed is returned as a column, so you can store it and regenerate the identical image later.
Testing ideas
- Stable faces. The same seed prefix and seed always produce the same avatar, so screenshot tests do not flicker.
- Crops. Compare square, circle and rounded crops in comment threads and user menus.
- Small sizes. Generate at 24 pixels to check that detail does not turn to mush in dense lists.
- Backgrounds. Turn off the solid background to test avatars on dark mode surfaces.
What this is not
URLs point at DiceBear's hosted API. For production, self-host the library or download the SVGs — a user list that loads a hundred avatars from a third party is a hundred external requests.