Avi
Simple placeholder avatars

Free & simple API for generating nice, colorful default avatars based on a given identifier (like username or email).

Just put your base64-encoded identifier after our URL, optionally specify the desired size and file format, et voilà!

Try it!

Type

Shapes by Monika Michalczyk

Usage

https://avi.avris.it/{{ type }}-{{ size=128 }}/{{ base64(identifier) }}.{{ format=png }}
{{ size }} Size in pixels, min. 16, max. 360.
{{ type }} “letter” or “shape”
{{ identifier }} Identifier, base64-encoded (with - and _ as last indexes).
{{ format }} Allowed: png (default), jpg and gif.

Examples

PHP, a 64x64 JPEG avatar:

<img src="https://avi.avris.it/letter-64/<?= strtr(base64_encode($user->getEmail()), '+/', '-_') ?>.jpg">

PHP, combine Gravatar with using Avi as a fallback:

<img src="https://www.gravatar.com/avatar/<?= md5(strtolower(trim($user->getEmail()))) ?>
        ?d=<?= urlencode('https://avi.avris.it/letter-64/' . strtr(base64_encode($user->getEmail()), '+/', '-_') . '.jpg') ?>
        &s=64" />