Thanks. After a quick search, I’ve seen that several tutorials use the filter like this, but I think it’s actually edge-case usage depending on an implementation detail of the Gravatar service (instead of the documented avatar-related functions):
The key is used as a option value for the “default image” property and passed to get_avatar()
et al. The built-in defaults all use a slug like mystery
or monsterid
, not an actual image. A custom default image should be rendered by also adding a filter on get_avatar_url
. However, in stock WordPress, ultimately everything gets passed to gravatar.com and if the d
parameter of the API call is not one of the pre-defined slugs, it will be interpreted as an image URL to load.
Since Avatar Privacy does not render default avatars via Gravatar.com, no valid URL is generated (since get_avatar_url()
knows nothing about your key) and thus the included blank.gif
is used instead. As this pattern seems to be a widespread pattern, I’ll probably add support for it in a future release, but for now, also filtering get_avatar_url
would seem to be the only option.