Following snippet used(and works great) but generates a redirect chain :(.
If (function_excists('basicgravatar')
function basicgravatar ($avatar_defaults) {
$myavatar = get_stylesheet_directory_uri() . '/images/gravatar.png'; //Child theme
//$myavatar = get_bloginfo('template_directory') . '/images/gravatar.png'; //Main theme
$avatar_defaults[$myavatar] = "New default avatar";
return $avatar_defaults; }
add_filter( 'avatar_defaults', 'basicgravatar' );
Using GTmetrix which shows following:
Remove the following redirect chain if possible: http://0.gravatar.com/avatar/?d=http://oursite.com/media/wp-content/themes/our-child-theme/images/gravatar.png&s=40 and 2 more lines with almost identical msg.
Also this is shown as result after using code above:
The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 2 request(s) and 20.2KiB.
The more comments the more redirects.
(The quotes above show results after only two(2) comments and 1 author box, imagine 50 or more comments...)..how to solve this, without editing any core file.
Thanks in advance for time and effort.