KyleAMathews/react-gravatar

option to show nothing

Opened this issue · 3 comments

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.

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.

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

@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).