Tag Info

New answers tagged


just use the function get_avatar, $default is for your custom default. <?php echo get_avatar( $id_or_email, $size, $default, $alt, $args ); ?> https://codex.wordpress.org/Function_Reference/get_avatar


The filter to disable the call to Gravatar.com completely is: add_filter( 'get_avatar', 'so_disable_gravatars', 10, 2 ); function so_disable_gravatars( $avatar ) { $avatar = ''; return $avatar; }


Gravatar by design doesn't require the downstream system to be aware if there is a match. The image (if any) is determined and served on request, only hash needs to be provided. It's impossible to "guess" from email or its hash if it has an avatar. That can only be resolved by request to the Gravatar. Basically to achieve this you will need to: query ...

Top 50 recent answers are included