Exemple #1
0
        public static string UserImageUrl(this UrlHelper urlHelper, string email, int?size = null)
        {
            var sizeValue = size.HasValue ? size.Value : GetGravatarDefaultSize(urlHelper);

            // Remove the leading "http:" from the Gravatar URL, so that the request will automatically use HTTPS in that context.
            return(Gravatar.Url(email, size: sizeValue).Remove(0, 5));
        }