Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gravatar No Longer working over https

For months we have been using a different default gravatar image for members of the site but suddenly this is no longer working.

Here is the error "we cannot complete this request remote data could not be fetched" when directly trying to reach the image located here: http://tinyurl.com/ou7tfg3

Here is what is in the functions.php file (wordpress)

 add_filter( 'avatar_defaults', 'mytheme_default_avatar' );
 function mytheme_default_avatar( $avatar_defaults ) 
 {
     $avatar = get_option('avatar_default');

     $new_avatar_url = get_template_directory_uri() . '/images/iBDgravatar.png’, ‘http’;

     if( $avatar != $new_avatar_url )
     {
         update_option( 'avatar_default', $new_avatar_url );
     }

     $avatar_defaults[ $new_avatar_url ] = 'Default Avatar';
     return $avatar_defaults;
 }

QUESTION: How can we serve just the image as http - insecure?

Or is there a better way to fix this?

Changing the URL to https doesnt seem to fix either

  add_filter( 'avatar_defaults', 'new_default_avatar' );

  function new_default_avatar ( $avatar_defaults ) {
    //Set the URL where the image file for your avatar is located
    $new_avatar_url = 'https://www.ibodyguardsdirect.com/wp-content/uploads/2013/gravatar/iBDgravatar.png';
    //Set the text that will appear to the right of your avatar in Settings>>Discussion
    $avatar_defaults[$new_avatar_url] = 'default';
    return $avatar_defaults;
   }
like image 503
user2903829 Avatar asked Mar 17 '14 14:03

user2903829


1 Answers

For https use "https://secure.gravatar.com/avatar/" instead of "http://www.gravatar.com/avatar/"

like image 94
NetVicious Avatar answered Oct 05 '22 12:10

NetVicious