How To Change WordPress Comment Avatar Size

  • follow us in feedly
Published April 4, 2013 by Brad Knutson
WordPress Comment Avatar Size

One complaint I hear over and over again is how boring and dull WordPress commenting system looks. The avatars are nice, but they are so small. In fact, in the twentytwelve theme, comment avatars are 44 pixels by 44 pixels.

Unfortunately, WordPress doesn’t give us an option in the admin to change the size of the avatar (side note here – it would be cool if this is something they added in WordPress 3.6 with the twentythirteen theme). Believe it or not, the avatar size is actually hard-coded to a 44 pixel square.

Fortunately, there is a way to change the size of the avatar, if you are willing (and able) to make modifications to your themes functions.php file.

If you are using the twentytwelve theme, or a theme derived from it, the code we are interested in should be on line 288.

Wordpress Comment Avatar Functions

All you have to do is change the ’44’ to whatever you want the size of your avatar to be. For this site, I chose 96, and I think it’s a good fit with my theme and the style of my comments. Different sizes might work better for you.

The following two tabs change content below.
Founder at Inbounderish
Brad Knutson is a Web Developer in the Twin Cities area of Minnesota. He has experience working with WordPress and Drupal, and also has an interest in SEO and Inbound Marketing.

Keep Up-to-Date



See a complete list of topics discussed in blog posts here.

Check These Out

Get 2 Weeks Free! Sign Up Today! Premium Managed WordPress Hosting Genesis Framework for WordPress SEO is complex. Tools should be simple. Thesis Theme for WordPress:  Options Galore and a Helpful Support Community

3 thoughts on “How To Change WordPress Comment Avatar Size

  1. Andreas Lotz

    I was following this to change the default Avatar size in the TwentyFourteen Theme. I can’t seem to get it to work. I have also edited the comments.php file of the theme:
    wp_list_comments( array(
    ‘style’ => ‘ol’,
    ‘short_ping’ => true,
    ‘avatar_size’=> ’80’,
    ) );

    NO success either.

    Any other ideas. please advise..

    1. Brad Knutson Post author

      In your functions PHP file do a search for get_avatar( $contributor_id, 132 );. If you see that, change 132 to whatever dimension you want your avatars to be.

    2. Andreas Lotz

      Dear Brad:

      Thanks for your reply. Appreciate it. However, it did not work.

      Let me be more specific, maybe you can still give me some directions.

      I am trying to change the Avatar size (from locally uploaded Avatars), that show when a user leaves a comment to a post. And again, I am trying to do this with the 2014 theme: /var/www/wordpress/wp-content/themes/twentyfourteen.

      I have edited two files, comments.php and functions.php:

      comments.php as follows:
      wp_list_comments( array(
      ‘style’ => ‘ol’,
      ‘short_ping’ => true,
      ‘avatar_size’=> ‘132’,
      ) );

      Then I restart apache and leave a new comment, but the Avatar size does not change.

      I have also edited functions.php as follows:

      div class=”contributor”>

      Same thing. The Avatar size of a local avatar does not change…

      Any further ideas?

      Again, appreciate you looking into this…

Share Your Thoughts

Your email address will not be shown.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">