A simple tag helper to display the Gravatar image using email address.
This tag helper is available on NuGet https://www.nuget.org/packages/GravatarTagHelpers/
After installation of nuget package, add the following line in _ViewImports.cshtml
.
@addTagHelper *, GravatarTagHelpers
To get the gravatar image for email address "example@test.com", use the following syntax.
<gravatar-img email="example@test.com" size="100"></gravatar-img>
<img src="http://www.gravatar.com/avatar/29e3f53ee49fae541ee0f48fb712c231.jpg?s=100&d=identicon&r=g"/>