Hello,
Thanks for contacting us and sorry for the inconvenience caused.
You can modify and use the following filters to add the image width and height to OG tags:
add_filter( "rank_math/opengraph/facebook/og_image_width", function( $content ) {
$content = '1200';
return $content;
});
add_filter( "rank_math/opengraph/facebook/og_image_height", function( $content ) {
$content = '1200';
return $content;
});
Hope that helps. Let us know if you need any other assistance.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello Jaideep Asrani,
Thanks for your answer
Unfortunately, the response received did not solve the problem.
The main cause is that our site uses images from a CDN, specifically from Cloudinary, Rank Math currently does not provide that support.
Therefore we had to consume this image from an ACF field (using the Advance Custom Field plugin), then we had to do a manual set for the image’s og meta tags, since using Rank Math we couldn’t do it.
I share the technical details in the “sensitive data option” Also, I share the approach we took, for resolving this issue.
Thanks
Hello,
We have replied to your email. The method you are using can work or you can also use the following filter to echo the OG tags in the meta data added by our plugin:
add_action( 'rank_math/head', function() {
//add the tags you want to show
}
Hope that helps. Let us know if you need any other assistance.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.