Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Andrew,

    I got the same problem and I found this solution working pretty fine for me on the latest plugin version. Follow these steps:

    1 Open file nextend-twitter-connect.php which is located in plugin directory /wp-content/plugins/nextend-twitter-connect

    2 Find the line: update_user_meta($ID, 'twitter_profile_picture', $resp->profile_image_url);

    3 Replace the line with the following code lines: `$profile_img_url = $resp->profile_image_url_https; // Calls 48×48 https URL
    $url_info = pathinfo($profile_img_url); //puts url info into a variable
    $url_ext = $url_info[‘extension’]; // declares profile image extension

    if ($url_ext === jpeg) {
    $original_img_short = substr($profile_img_url, 0, -12); //deletes 12 chars from end for jpeg
    }
    else {
    $original_img_short = substr($profile_img_url, 0, -11); //deletes 11 chars from end for jpg/png
    }

    $original_img_final = $original_img_short.’.’.$url_ext; // Adds extension back to URL

    update_user_meta($ID, ‘twitter_profile_picture’, $original_img_final);`

    Solution link:

    What it does is the code manually rewrites the image link by removing the last 11 symbols if image is in .png or .jpg and last 12 symbols if the image is in a .jpeg format.

    Hope this helps!

    Thread Starter Andrew Misplon

    (@misplon)

    Hi @twelvell

    Thanks so much for taking the time to share this solution with me. I won’t be able to give it a try until next week but will definitely do so when I’m back at work.

    Thanks again ??

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change plugin to retrieve bigger Twitter avatar size’ is closed to new replies.