Get users only if Gravatar is specified

Gravatar by design doesn’t require the downstream system to be aware if there is a match. The image (if any) is determined and served on request, only hash needs to be provided.

It’s impossible to “guess” from email or its hash if it has an avatar. That can only be resolved by request to the Gravatar.

Basically to achieve this you will need to:

  1. query Gravatar service for each user
  2. store that information to query by
  3. oh and re-run this forever to keep it updated

This just isn’t very practical and shoots the convenience that is the main point of Gravatar service.

The most common workaround is to use generated fallbacks (identicons, etc).