Gravatar stands for Globally Recognized Avatar. It is globally recognized because millions of people and websites use them. If you are a reader of blogs and add comments on the articles, chances are the blog or website might show an image which is loaded from the Gravatar. It’s simple and free, you can create your own gravatar from here.

In this post we are going to discuss about how to know if some user/email has no gravatar. If you are develoer and already using Gravatar in your website, you know how the Gravatar’s URL is generated. Below is the structure of Gravatar image URL-<md5 of the email>

Checking if the email has image uploaded on Gravatar

Now you know that to generate the Gravatar URL of any user, you will need to use md5 hash of their email address. That’s great but how to check if the email Gravatar has not been uploaded at all?

Simple, add a query parameter in the URL d=404 so the URL now becomes-

Wasn’t that simple? :)