Gravatar

Gravatar URL Generator

Gravatar URL Generator is a simple, lightweight, open source implementation of Gravatar URLs. It is licensed under the Apache open source license and is available on GitHub. It supports 100% of the features detailed in Gravatar's implementation guide. and was developed using test driven development.

The form below will generate gravatar image links based on the rules for generating gravatar urls.

(required)
In pixels. Between 1 and 512. (optional)
(optional)
(optional)
or
(optional)

Sample usage:

Sample usage: The following code prints out the URL to the Gravatar image based on the supplied email address:

GravatarUrl gravatarUrl = new GravatarUrl("iHaveAn@email.com");
System.out.println(gravatarUrl); // toString() returns the gravatar url

The optional size, rating and default icon settings are also supported. Constants for rating and default icon are provided for convenience.

GravatarUrl gravatarUrl = new GravatarUrl("iHaveAn@email.com", 512, GravatarUrl.Rating.PG, GravatarUrl.DEFAULT_ICON_IDENTICON);
System.out.println(gravatarUrl); // toString() returns the gravatar url

1 comment:

  1. when i use a default url, the returned image will ignore the size of the source url! WHy?

    ReplyDelete