How can I filter the user avatar displayed in comments? – get_avatar_url filter works everywhere but not in comments
By default, wp_list_comments() uses the get_avatar() function to display user avatars, which in turn retrieves the avatar URL from Gravatar. However, get_avatar() also applies the get_avatar_url filter before returning the URL, so you can modify the avatar URL for the comments by using that filter. Here’s an example of how you can modify the avatar …