TagHelperPack icon indicating copy to clipboard operation
TagHelperPack copied to clipboard

Feature Request - Create a Gravatar Component

Open sipmann opened this issue 3 years ago • 1 comments

I don't know how far in components the project is aiming. but a component that I use a lot is one to generate a Gravatar image.

If aprooved, I can do a pull request with it.

sipmann avatar Sep 03 '21 15:09 sipmann

Do you mean something like the following?

<gravatar name="[email protected]" />

Which would render something like:

<img src="https://www.gravatar.com/avatar/538d845ead710ee91dfa89724b90b2e2" />

Perhaps with support for sizes, e.g.:

<gravatar name="[email protected]" size="200" />

Which would render something like:

<img src="https://www.gravatar.com/avatar/538d845ead710ee91dfa89724b90b2e2?s=200" />

And overriding the default image:

<gravatar name="[email protected]" default="https://myapp.com/images/default-avatar.jpg" />

Which would render something like:

<img src="https://www.gravatar.com/avatar/538d845ead710ee91dfa89724b90b2e2?d=https%3A%2F%2Fmyapp.com%2Fimages%2Fdefault-avatar.jpg" />

And lastly support for specifying ratings:

<gravatar name="[email protected]" rating="GravatarRating.PG" />

Which would render something like:

<img src="https://www.gravatar.com/avatar/538d845ead710ee91dfa89724b90b2e2?r=pg" />

That sounds very useful :smile:

DamianEdwards avatar Dec 14 '22 23:12 DamianEdwards