-
Hello
I have a free version of the plugin.But. We have an issue with the twitter image. Preview works fine in the dashboard but doesn’t work in twitter.
I have read a lot of articles and twitter docs and founв a solution.
/seo-by-rank-math/includes/opengraph/class-opengraph.php
/**
* Output the image for Twitter.
*
* Only used when OpenGraph is inactive or Summary Large Image card is chosen.
*/
public function image() {
….
$this->tag( ‘twitter:image’, esc_url_raw( $image_url ) );
}
}Replaced by
/**
* Output the image for Twitter.
*
* Only used when OpenGraph is inactive or Summary Large Image card is chosen.
*/
public function image() {
….
$this->tag( ‘twitter:image:src’, esc_url_raw( $image_url ) );
}
}So, replaced twitter:image meta tag to twitter:image:src
And now all works fine.
Do you know something about this?
I am thinking, what to do with that. If I update the plugin, this fix will be overwritten.
Best regards,
Alex
The ticket ‘Twitter image doesn’t work’ is closed to new replies.