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;
}
For https use "https://secure.gravatar.com/avatar/" instead of "http://www.gravatar.com/avatar/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With