protected String generateGravatar(FacesContext context, Avatar avatar) {
        String email = avatar.getGravatar();
        String config = avatar.getGravatarConfig();
        if (LangUtils.isBlank(config) && avatar.canFallback()) {
            config = "d=blank";
        }
        String url;
        try {
            StringBuilder sb = SharedStringBuilder.get(context, SB_AVATAR);
            sb.append(GRAVATAR_URL);
            generateMailHash(sb, email);
            if (LangUtils.isNotBlank(config)) {
                sb.append('?').append(config);
            }
            url = sb.toString();
        }
        catch (NoSuchAlgorithmException e) {
            throw new FacesException("Failed to generate Gravatar URL for value: " + email);
        }
        return url;
    }
Generate a Gravatar URL for an email addressed based on API docs.

@see <a href="https://en.gravatar.com/site/implement/images/">Image Requests</a>
@param context the Face
@param avatar the Avatar to create a Gravatar for
@return the URL to retrieve the Gravatar image
primefaces/src/main/java/org/primefaces/component/avatar/AvatarRenderer.java