Skip to:
Content
Pages
Categories
Search
Top
Bottom

Issues with Changing Default Profile Picture/Avatar


  • ekko848
    Participant

    @ekko848

    Hello,

    I am looking to change the default ‘mystery man’ avatar with my own custom image url.

    For whatever reason, the following in my bp-custom.php does not work/do anything

    $img_url = "https://localhost/www/wp-content/themes/default-theme/images/defaultprofile.png";
    define ( 'BP_AVATAR_DEFAULT', $img_url );
    define ( 'BP_AVATAR_DEFAULT_THUMB', $img_url );

    So alternatively I used the following code

    function myavatar_add_default_avatar()
    {
    return 'https://localhost/www/wp-content/themes/default-theme/images/defaultprofile.png';
    }
    add_filter( 'bp_core_mysteryman_src', 'myavatar_add_default_avatar' );

    Now, this “works”, meaning, it changes the default profile picture, but goes to a broken image… the broken image url is

    https://i2.wp.com/localhost/www/wp-content/themes/default-theme/images/defaultprofile.png?ssl=1

    Now, I have no idea where i2.wp.com is coming from, but it’s breaking my image source.

    Confusing, right? Anyone know what’s up with this and how to set it straight?

Viewing 1 replies (of 1 total)

  • ekko848
    Participant

    @ekko848

    So, taking it off localhost and onto my live site fixed the broken image problem.

    But, I am still confused as to why BP_AVATAR_DEFAULT is not working at all?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar