-
Hi!
I want to change the image shown next to google’s search results.
It looks like Rankmath uses ImageObject and primaryImageOfPage in its structured data and that these properties are responsible for the image in the search results. The configured URL corresponds to the image displayed.
How can I change this URL so that it doesn’t match the first picture on my page?
I’ve read that Rankmath uses get_avatar_url to get this URL, so I’ve used the following filter in rankmath.php to change it, but without success:
add_filter( ‘get_avatar_url’, ‘my_get_avatar_url’, 10, 3 );
function my_get_avatar_url( $url, $id_or_email, $args ) {
$args[‘url’] = ‘https://example.com/wp-content/uploads/2025/01/MyPicture.jpg’;
return $args;
}Thanks for your help!
The ticket ‘Change Image in SCHEMA’ is closed to new replies.