Support » Plugin: Simple Local Avatars » Migrating to HTTPS

  • We have just moved our site to HTTPS.

    The local avatars are the only images on the page that are still coming from HTTP – so causing issues.

    I can see in the ‘usermeta’ table that ‘simple_local_avatar’ contains the absolute URL of each sized avatar, and that it’s pointing to HTTP.

    I did a search and replace for this table, updating all http:// to https://.

    This has caused all avatars to stop appearing on the site. I’ve checked the simple_local_avatar row and the only difference is the https:// reference.

    Uploading a new avatar for a user overwrites their simple_local_avatar row, and then the avatar is displaying correctly. The issue is we have 160 users with avatars, so I’m not going to go through one by one and re-upload.

    Any idea what is going on here?

Viewing 2 replies - 1 through 2 (of 2 total)
  • line #174
    if ( ‘http’ != substr( $local_avatars[$size], 0, 4 ) )
    $local_avatars[$size] = home_url( $local_avatars[$size] );

    // Ov3rfly
    if ( ‘http’ != substr( $local_avatars[$size_2x], 0, 4 ) )
    $local_avatars[$size_2x] = home_url( $local_avatars[$size_2x] );

    if ( is_ssl() ) {
    $local_avatars[ $size ] = str_replace( ‘http’, ‘https’, $local_avatars[ $size ] );
    if ( isset( $local_avatars[ $size_2x ] ) )
    $local_avatars[ $size_2x ] = str_replace( ‘http’, ‘https’, $local_avatars[ $size_2x ] );

    Check that URL

    You just need to add the code of that solution in your function.php theme file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Migrating to HTTPS’ is closed to new replies.