No, haven’t heard of this before. Don’t see how I can set a custom one in Settings -> Reading either, so guess this is done with a plugin? I would do your standard AO troubleshooting here; disable just CSS or just JS or just HTML or just Image optimization (incl. lazyload) to see which one is causing this and drill down to see how to work around that (e.g. by excluding CSS or JS from optimization).
If you can provide your site’s URL I’ll be happy to assist in that process 🙂
frank
It’s a bit of PHP I added with snippets.
add_filter( ‘avatar_defaults’, ‘generic_new_gravatar’ );
function generic_new_gravatar ($avatar_defaults) {
$myavatar = ‘gravatar-url’;
$avatar_defaults[$myavatar] = “Default Gravatar”;
return $avatar_defaults;
}
I’ve used this for a long time without an issue. It simply adds it to the Settings –> Discussion page as an option for selection.
I followed the steps you suggested and disabled each of the CSS, JS, and HTML one at a time. I went through and turned every possible option, actually. Nothing fixed the error except turning Autoptimize off completely.
That’s why this one seems to be a head-scratcher. Again, I’ve used this configuration for months without a problem at all, and then it suddenly started happening.
So you just replace the default Gravatar URL with your own? And all of a sudden you don’t see your own default, but Gravatar’s again? _very_ weird, I don’t see how AO would cause that I’m afraid …
As a workaround you could hook into the autoptimize_html_after_minify filter and str_replace Gravatar default with your default one? Something like;
add_filter('autoptimize_html_after_minify','replace_gravatar');
function replace_gravatar($htmlIn) {
return str_replace( '<default gravatar image url>', '<your default image url>', $htmlIn );
}