seedable-random-avatar-generatordeprecated

A library to generate random avatars images URL using https://getavataaars.com, optionally based on a string seed.

Usage no npm install needed!

<script type="module">
  import seedableRandomAvatarGenerator from 'https://cdn.skypack.dev/seedable-random-avatar-generator';
</script>

README

Seedable Random Avatar Generator

Usage

Simple

import { getRandomAvatar } from 'seedable-random-avatar-generator';

// Returns get a url for a random avatar
getRandomAvatar();

With a seed

For instance, if you want to generate a random avatar for a user id/email which stays the same each time.

import { getRandomAvatar } from 'seedable-random-avatar-generator';

getRandomAvatar('avatar'); 

In the example above, specifying the seed avatar results in this image: -

avatar

https://avataaars.io/?accessoriesType=Kurt&avatarStyle=Circle&clotheColor=Blue01&clotheType=Hoodie&eyeType=EyeRoll&eyebrowType=RaisedExcitedNatural&facialHairColor=Blonde&facialHairType=BeardMagestic&hairColor=Black&hatColor=White&mouthType=Sad&skinColor=Yellow&topType=ShortHairShortWaved