• Resolved ganymod

    (@ganymod)


    Hello,

    How can I change the avatar size?
    specified are 150×150 px

    how can i change it to for example: 100x100px?

    many thanks for the help,
    greetings Jürgen

Viewing 1 replies (of 1 total)
  • Hi,

    We have used the default gravatar function of WordPress. You can use the following code to change the size of the gravatar:

    
    add_filter('pre_get_avatar_data', 'pre_get_avatar_data_cb', 10, 1);
    function pre_get_avatar_data_cb($args){
    if(is_uwp_profile_page()){
            $args['size'] = 100;
            $args['width'] = 100;
            $args['height'] = 100;
            return $args;
        }
        return $args;
    }
    

    Please note: This will change the size of gravatar for the profile page. So if you want to change the size of gravatar on the other pages then you can use the conditional tags.

    Regards,
    Patrik

Viewing 1 replies (of 1 total)
  • The topic ‘avatar size’ is closed to new replies.