Want to stop loading gravatar script in my wordpress site

1.5k views Asked by At

I have a WordPress site, but not using for blog. I will try the following code in functions.php to stop loading gravatar in my site but it's not working.

function __default_local_avatar() {
    // this assumes default_avatar.png is in wp-content/themes/active-theme/images
    return '';
}
add_filter( 'pre_option_avatar_default', '__default_local_avatar' );

Is any other way to stop loading gravatar in my site?

Thanks Advance

1

There are 1 answers

0
Alien On BEST ANSWER

Try to disable Gravatar images

Go to Settings -> Discussion -> Scroll down till you reach the bottom of the page in the Avatars Section -> Click to disabled Show Avatars and finally press the Save Changes button.

enter image description here