If you are frustrated by the limitations of Gravatar like 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. Then UI Avatars API is just meant for you as it doesn’t have such limitations that Gravatar have.
Lassen Rafn has created it as a simple-to-use free and open-source API to generate user initials based avatars with no limiting or login. “No usage tracking and no information is stored. The final images are cached, but nothing else.” as mentioned on Site. It can also be considered as an alternative of SVG based user initials avatar generator.
Whereas What makes it special is that it is very well executed, with a sane and simple API, good performance considerations, and it fits its purpose perfectly.
How to use:
All requests return’s an image stream to be used directly in a <img/> tag.
Generate an avatar with default settings, for user “John Doe”.
Generate a blue avatar
It also supports some of the Unicode scripts/languages that are not supported by the typical fonts. Like Arabic, Armenian, Bengali, Georgian, Hebrew, Mongolian, Thai, and Tibetan. Its WordPress plugin is also available.
As a conclusion, we can say that it is one of the well-executed minimal project, worth a try.