Skip to:

Group Avatars, how to change the default

  • I’ve been going through this for a long time now and I can’t seem to figure it out.

    WHERE ARE THE AVATARS DEFINED. I could have sworn I saw the random generator somewhere in the code before, but I didn’t need it then!

    I know that when you go to create a new group, the avatar is randomly taken from and you get some random crazy pattern.

    All I would like to know is, where is that defined.


    I would like to know how to change it so that my image (I’ve created a default group avatar), is the default group avatar. I don’t want anymore crazy patterns.

    On another note to avatars.

    I’m using the bp-events component, and for some reason the avatar that is generated is always and I really need to change that.

    But I have a feeling if you help me fix my first problem, I’ll be able to fix the other.

    Thank You


Viewing 8 replies - 1 through 8 (of 8 total)

  • Brajesh Singh


    The code for fetching avatar resides in buddypress/bp-core/bp-core-avatar.php

    checkout this function there


    There are several filters there and you can use those filters to manipulate the things better.

    Brajesh, you’re very helpful.

    I’ll fiddle around there for a bit and see what I can do.

    I’ve already started seeing something happening, so that’s a good sign.


    Hmm, now in this code, it’s ‘fetching’ the avatars, but is this the code that is actually ‘generating’ the random code for the avatar.

    I’m more looking for the code that will select a random image when you are creating a group, but i’ll keep lookin.

    Sorry for bumping this up, but does anyone know how to change the default avatars?

    Michael Eisenwasser


    To change the default “member” avatars, go to /wp-content/themes/bp-sn-parent/_inc/images/mystery-man.jpg

    Just override mystery-man.jpg with a new image of the same title.



    Would really love to change the default group avatar if possible, if anyone figures it out, please post!



    Add this to your bp-custom.php file:

    function tj_add_default_avatar( $url )
    return get_stylesheet_directory_uri() .'/_inc/images/avatar.jpg';
    add_filter( 'bp_core_mysteryman_src', 'tj_add_default_avatar' );

    You might have to adjust the path and/or change the image name.

    EDIT: Oops, just realized you wanted to change the group avatar. I’ll have a look…



    Closing this thread as it appears we have two threads talking about the same thing.

    Please add to the discussion here:

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Group Avatars, how to change the default’ is closed to new replies.
Skip to toolbar