This small function allows you to change the default WordPress avatar when using ImagePress and skip all WordPress-generated ones.
This feature works with ImagePress version 7 or higher.
add_filter('avatar_defaults', 'imagepress_default_gravatar');
function imagepress_default_gravatar($avatar_defaults) {
$myavatar = 'path/to/your/avatar.jpg';
$avatar_defaults[$myavatar] = 'Default ImagePress Avatar';
return $avatar_defaults;
}
Use this in your theme’s functions.php
file or in a custom plugin.

Technical SEO specialist, JavaScript developer and senior full-stack developer. Owner of getButterfly.com.
If you like this article, go ahead and follow me on X or buy me a coffee to support my work!