Replace default avatar
I figured this out. The server I am working on doesn’t have access to the outside. So, even though the image is in my template folder, the gravatar.com call in front of the image path was causing the error.
I figured this out. The server I am working on doesn’t have access to the outside. So, even though the image is in my template folder, the gravatar.com call in front of the image path was causing the error.
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
It depends on what you call “nice” of course – it’s hard to create something meaningful with an algorithm. Someone once created a unicorn-generator, which was used on April 1, 2010 all over Stack Overflow. Your unicorn looks like this:
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
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
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
You have the Photon module enabled in the Jetpack plugin. That module routes your images through WordPress.com’s CDN. If you don’t want this to happen, disable the Photon module in Jetpack.
Unfortunately at moment Gravatar service itself only accepts single number for size and only serves square images. So you have to achieve it with CSS or download, modify and cache images.
I had a look at the avatar related functions/filters WP provides and I don’t think there is a direct way to tell, if the avatar is a real one or the default image as you only have url to work with. But, I also looked at the Gravatar implementation guide, https://en.gravatar.com/site/implement/images/, which notes that you … Read more
If you are looking to connect your sites sign-up with Gravatar then you simply can’t, since Gravatar don’t have a sing-up api you can use. But if you are just looking to let your users upload there own photos the either Simple Local Avatars Plugin that Chip suggested or one I’ve used a lot before … Read more