KyleAMathews / react-gravatar

React component for rendering a gravatar profile image
http://kyleamathews.github.io/react-gravatar/
MIT License
279 stars 33 forks source link

option to show nothing #131

Open benrlodge opened 8 years ago

benrlodge commented 8 years ago

Cool component. It would be cool if there was a prop that chooses not to display any image if the person doesn't have a gravatar.

KyleAMathews commented 8 years ago

This would be something the gravatar service itself supports. I haven't looked at the API in a while but if you look and something is supported for this, would happily accept a PR.

Sicria commented 7 years ago

This is an old issue but if you set the default prop to blank it accomplishes what you're after.

IsenrichO commented 6 years ago

@Sicria That's a cool workaround, but I don't think that addresses the underlying issue. Based on the original issue's description, we would only want to set default to blank if the user doesn't have a Gravatar. Do we have a way of detecting if the component is falling back to the default Gravatar?

I have the same issue. In my case, I set default to mm but also pass the user's email. What this means is that we have actual Gravatar user images for those who've set their own images reflecting that email. However, I'd prefer to render my own component if the user hasn't set their own Gravatar (and not the mystery man mm image).