Trying to fix a plugin (https://wordpress.org/plugins/gravatarlocalcache/ not mine) which broke on the 4.2 update.
The plugin makes a locally cached version of Gravatar.com avatars.
Plugin hasn't been updated recently (current version 1.1.2) and looks abandoned, so though I've posted in the WordPress support forum, doubt I'll get a fix from the plugin author.
Tracked the issue down to WordPress 4.2 (works in 4.1), but don't know why.
The plugin makes a local copy of Gravatar.com avatar images using
$_tmp = download_url(str_replace(utf8_encode('&'), '&', $_imageurl));
With avatars that have a Gravatar account (registered email addresses) the correct image is saved locally. For the randomly generated avatars the default Gravatar logo (blue avatar with a G in the middle) is saved instead with the correct filename.
So for commenters who have a Gravatar account their profile images are saved locally, for generated avatars the correct filename is saved, but it's a copy of the G logo.
Avatar changes in 4.2 is the addition of responsive images using the scrset attribute which is a copy of the Gravatar URL ending in x2. I don't see how this would stop the correct image being saved for the randomly generated images only.