14+ years building on WordPress / Replies in under 5 hours
WordPress 1 min read · Updated July 2026

Remove Avatars from WordPress Blog Comments

AK
Ajay Khandal
WordPress Developer
TL;DR

Comment avatars load as individual images and can noticeably slow down a post's load time once a page has 50 or more comments. You can disable avatars sitewide from Settings > Discussion, but that also removes the author's avatar; a short functions.php snippet lets you strip avatars from only the comments while keeping the author's avatar intact. This is a quick performance fix worth applying on any post with a high comment volume.

Avatars appear on every blog comment section on WordPress websites. These avatars are shown in the format of JPG. So it’s obvious that they also affect website load time.

If a website has more than 50 comments, there’s a chance of having more than 50 avatars in the comment area. This will decrease post speed significantly.

To remove these avatars, there is a direct option available in the WordPress admin area. Here are the steps to follow to disable avatars from the comment section:

Settings > Discussion — disable avatars sitewide.

But this will remove the author’s avatar too. Here is another solution that keeps the author’s avatar and removes only the avatars from the comments area.

Open the functions.php file of your current theme and add the following lines at the end of this file:

/**
 * Remove avatars from comment list
 * @link https://ajaykhandal.com/remove-avatars-from-wordpress-blog-comments/
 */
function aj_remove_avatars_from_comments( $avatar ) {
    global $in_comment_loop;
    return $in_comment_loop ? '' : $avatar;
}
add_filter( 'get_avatar', 'aj_remove_avatars_from_comments' );

Looking to round out your WordPress knowledge? Learn more about how to stop spam submissions on your WordPress forms. Learn more about how to get the title in a WordPress template page.

AK

Written by Ajay Khandal

WordPress Developer — building, fixing and speeding up WordPress sites.

Work with me →