Last week we made some changes to how default images, sometimes called “fallback images”, are handled in Gravatar URLs. The purpose of these changes was to enhance the security of the Gravatar API and protect the many of millions of users who view billions of Gravatars every day. The majority of you will not notice any change – which is good! If you’re a developer though, you should keep these recent updates in mind.
You can read all about how default images work on the implementation page, but the short version is:
Default images must be publicly accessible via a simple HTTP or HTTPS request on the standard ports of 80 and 443, respectively. They must have a valid image file extension of
If your default image is not publicly accessible, doesn’t have a file extension, is not actually an image, requires HTTP Authentication, or is otherwise unavailable to a normal web request, it cannot be used as the fallback/default image for a Gravatar. On the backend, we are now processing default images through a new service we have been working on called Photon, which we will talk more about soon.
We’ve also introduced a new default image which you can use, called ‘blank’. Just use
?d=blank and you’ll get a transparent PNG image in whatever size you asked for if the requested Gravatar doesn’t exist. More details on this are on the image implementation page as well.