How to get gravatar url alone

Just generate the URL yourself. It’s just a hash of the user’s email address. function get_gravatar_url( $email ) { $hash = md5( strtolower( trim ( $email ) ) ); return ‘http://gravatar.com/avatar/’ . $hash; } This function requires that you pass the user’s email address in … but you could do anything you need to programatically … Read more

Rectangle avatars

As far as I know the get_avatar() function only allows for square values. That doesn’t mean you couldn’t use styling to display a rectangular avatar. Essentially you would use styling to “shave off” 150px from the width. So, let’s assume that your theme file produces a 300 x 300 pixel avatar for the post author … Read more

Wrong gravatar showing up?

If you go to http://gravatar.com/d6b10d5767d1e29006c11e1a2c590f3c (omit the /avatar/ from path) you get http://gravatar.com/clojita which seems to be your gravatar account, correct? MD5 collision is unlikely (but maybe it’s time to buy a lottery ticket 🙂 Look at source fetches interesting detail — the comment in question has comment-author-clark class. So it’s not only the gravatar … Read more

How to override Member’s Avatars in BuddyPress [closed]

The filters you cite are only for the default/fallback avatars. If you want to replace BP avatars altogether, the key filters are bp_core_fetch_avatar and bp_core_fetch_avatar_url. The latter filters the entire HTML avatar element, while the latter does just the URL. How you do the filtering depends on how fancy you want to get. The bp_core_fetch_avatar … Read more