Picvatar

Generate unique avatars from a Picrew - Like Gravatar, but cooler!

API

Generate an image from a sha256 hash

/generate/:makerid/:hash?gravatar=bool

Returns: The generated image in png format.

:makerid - The ID of the Picrew maker you want to use. You can get this from the Picrew URL: https://picrew.me/en/image_maker/000000

:hash - Hex-encoded sha256 hash of the email address (or whatever other identifier you want to use).

?gravatar=bool - If this is set to true or 1, and the provided hash belongs to an email on Gravatar that has a custom avatar set, a redirect to that avatar will be returned and no Picrew will be generated. Any other value will disable this behaviour.
Note that this will slow down load times.

Generate an image from an email address

/generate/:makerid/:email

Returns: a redirect to /generate/:makerid/:hash, where :hash is a sha256 hash created from the provided email address. This is useful when you don't have access to relevant APIs to generate a sha256 hash, such as on a vanilla JS website without external dependencies.
Query parameters will be forwarded, so any parameters for /generate/:makerid/:hash are available.

:makerid - See above.

:email - The email address you want to generate an avatar for. Make sure this is URL-encoded!

The boring stuff

If you plan on using this, please respect the copyright and license of the Picrew - it's not my job to enforce other people's copyright, so please be reasonable. I also recommend self-hosting this - a Dockerfile and example docker-compose config is provided in the repository.

This is a one-day side project of mine that I'll likely never touch again, but the source code is available here.
Reverse engineering Picrew and trying to figure out how to use the available data to manually render images was a fun challenge, but it is nothing I intend to put long term maintenance into. If you find a bug, feel free to report it, but if Picrew completely changes their backend then I will likely not rewrite everything from scratch to accomodate that.

Enjoy <3