WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Social Login
[resolved] Twitter Avatar too small (3 posts)

  1. schoenwaldmedia
    Member
    Posted 1 year ago #

    Hi there,

    the plugin as a whole works fine. But sadly the avatar of a twitter-account is only the 48x48px sized version. I would like to show the wordpress-standard-size of 96x96px.

    Example

    Is there any option to get a bigger avatar?
    I've searched in the plugin-files to find the order which captures the avatar from the twitter-app. But I wasn't able to find it.

    Thanks,
    Nils

    http://wordpress.org/extend/plugins/wordpress-social-login/

  2. Miled
    Member
    Plugin Author

    Posted 1 year ago #

    that the size we receive from twitter API and there is no easy way to change it (at least for now).

    if you want to have a bigger picture (so badly) then here is how:

    http://plugins.trac.wordpress.org/browser/wordpress-social-login/trunk/includes/services/wsl.authentication.php#L916

    if( strtolower( $provider ) == 'twitter' ){
    	update_user_meta ( $user_id, 'wsl_user_image' , str_ireplace( "_normal", "", $hybridauth_user_profile->photoURL ) );
    }
    else{
    	update_user_meta ( $user_id, 'wsl_user_image' , $hybridauth_user_profile->photoURL );
    }

    nonetheless, I will look what can I do in future versions, but I won't promise anything.

  3. Miled
    Member
    Plugin Author

    Posted 1 year ago #

    or a better solution is to make a hook to modify the user avatar.. google for "add_filter( 'get_avatar'"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic