UI Avatars has a simple-to-use API with no limiting or login. No usage tracking and no information is stored. The final images are cached, but nothing else. Just write name or surname, or both.
NEW! Can now use ?uppercase=false to prevent uppercasing the name.
NEW! Digitalocean sponsors us, so we will be adding more regions.
NEW! Faster responses with Nginx sendfile (Thanks to HSPDev).
NEW! Set image quality to 100%, from 90%.
All requests returns a image stream to be used direcly in a
Avatar image size in pixels. Between: 16 and 256. Default: 64
Font size in percentage of
size. Between 0.1 and 1. Default: 0.5
Length of the generated initials. Default: 2
The name used to generate initials. You can specify the initals yourself as well. Default: John Doe
Boolean specifying if the returned image should be a circle. Default: false
Hex color for the image background, without the hash (#). Default: ddd
Hex color for the font, without the hash (#). Default: 222
Decide if the API should uppercase the name/initials. Default: true
All settings above can be mixed together as you desire.
A good use-case would be using it as a fallback for Gravatar. Example:
Because of limitations in Gravatar, we must pass in the parameters as sub-directories, instead of query-parameters. You should also consider urlencoding the name, in case it contains special characters. It's a limitation by Gravatar, not UI Avatars.The order is as follows:
I recommend using 1.5x or 2x sizes for your avatars, but keeping the img tag the original size, to ensure crisp avatars on high DPI screens.
I have added support for some unicode scripts/languages that are not supported by the typical fonts. Current support:
It has Wordpress plugin! As you can understand you can also use the Wordpress plugin, which is also free.
Servers are setup in the following countries/states: