1.4.10 ā€¢ Published 3 years ago

generate-avatar v1.4.10

Weekly downloads
192
License
MIT
Repository
github
Last release
3 years ago

šŸ‘† The logo is: generateFromString('generateavatar')

License Version bundle size (minified) type definitions

Check out the example and download your avatar: https://generate-avatar.now.sh/

Why use Generate Avatar?

A lightweight and blazing fast avatar generator, which is 100% fingerprinted and unique for any input you want.

Pass in your email, uuid, username etc. as an input and it will generate everytime the same unique svg based avatar for you.

Which means you don't have to store any generated images in your database anymore. It generates those images on the fly wherever you want based on the id, email and so on.

The best thing it's only 5 kB small, so it can be basically used everywhere you want.

Install

  yarn add generate-avatar

or

  npm install generate-avatar

How it works

You pass in the string you want and it will return the svg in a string format:

  import { generateFromString } from 'generate-avatar'

  generateFromString("example@test.com")

This will generate the svg in a string format. In order to use it, you can use the image data src attribute like this:

<img src={`data:image/svg+xml;utf8,${generateFromString("example@test.com")}`} />

Try it out here and download the image. You will see that it generates the exact same image everytime. Isn't that amazing ?

1.4.10

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.1.0

4 years ago

1.3.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago