A simple tag helper to display the Gravatar image using email address.
JavaScript CSS C# Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitattributes
.gitignore
Build.ps1
GravatarTagHelpers.sln
License.txt
README.md
global.json

README.md

GravatarTagHelpers

A simple tag helper to display the Gravatar image using email address.

Setup

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

Code

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>

Output

<img src="http://www.gravatar.com/avatar/29e3f53ee49fae541ee0f48fb712c231.jpg?s=100&d=identicon&r=g"/>

License

Apache 2.0