Ok, so you can use this filter: generate_navigation_logo
https://docs.generatepress.com/article/generate_navigation_logo/
with the get_avatar_url
function:
https://developer.wordpress.org/reference/functions/get_avatar_url/
Which results in a PHP Snippet that you can add to your site:
add_filter( 'generate_navigation_logo','lh_category_navigation_logo' );
function lh_category_navigation_logo( $logo ) {
$logo = get_avatar_url( 'your_user_email' ,['size' => '80'] );
return $logo;
}
In the get_avatar_url
function you will see the first field requires an ID or user email, so the 'your_user_email'
needs updating in the function. And set the size in pixels that you need the image to display.
One thing to note – this will require a 3rd party request being made to the gravatar servers which can lead to a delay in that image being first displayed.