Skip to:

Re: Gravatar redirect chains cause too much load time



@hnla: The Gravatar implementation is rather good considering what it’s trying to do. The unfortunate place where it breaks down is when you have a lot of users who haven’t registered with Gravatar and the default Mystery Man image is sent back numerous times with different URLs.

The biggest change I’d like to see in handling of Gravatars is for WP (or BP or whatever) to intelligently check if a user has a Gravatar. If the user doesn’t have one then save that info in their profile and server either a local default or user the Gravatar Mystery Man default that is generated the the address. This would result in a consistent URL that can be better cached by browsers for users who do not have a Gravatar.

To handle when users actually register a Gravatar, just check Gravatar every X times their avatar image is needed and if one is found, use it (and update their profile info in the DB to reflect this).

On a “normal” WP site where anyone can toss in their email address, this isn’t as useful but on a BP site where your users are registering, this makes a lot of sense (to me).

Skip to toolbar