Remove from default avatar link

Hi, I using an external link with Add New Default Avatar plugin that displays, instead of

any suggestions on removing unnecessary ? it slows down loading of site. below is php code for plugin.

  • Alexander
    • DEV MAN’s Mascot

    Hey @buddha,

    I removed all that code, as there’s really no reason to post an entire plugin’s code. Just a link would be ok.

    I’m not sure what would cause that, but that plugin is only tested as far as 3.5.2 If you read the comments on it’s site, you can see people complaining about things not working correctly. It seems the project might be abandoned, as they haven’t responded to any recent support issues here:

    Now, rather than using a plugin, the Codex suggests a quick way to do this with some custom code. You can take a look here:

    If you wanted a version that pulled an image from your media library, you could try something like this:

    add_filter( 'avatar_defaults', 'new_default_avatar' );

    function new_default_avatar ( $avatar_defaults ) {

    $image = wp_get_attachment_image_src( 123 );
    $avatar_defaults[$image[0]] = 'New Default Avatar';
    return $avatar_defaults;

    Then replace 123 with the ID of the media attachement to use.

    Best regards,

  • buddha
    • Syntax Hero

    thanks, that worked great! – only adjustment needed was to remove “<?php” when adding to bottom of child theme’s functions.php

    another helpful hint is to hover over image file name in media library to see post # to replace “123” in code above

    then go to Settings, Discussion, and choose new default avatar

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.