-
Dear RankMath Support Team,
I hope this message finds you well.
I am currently facing an issue with Open Graph image settings for my website, where the OG image is not displaying properly on Facebook. I have spent the entire day troubleshooting, but despite numerous attempts and configurations, the problem persists. I kindly request your assistance in resolving this matter as it seems to be affecting multiple users, based on forum discussions.
Here is a summary of what I have already done:
Code Implementation:
I added the following code snippet to my theme’s functions.php file to ensure custom Open Graph image support for my landing pages:
add_filter( "rank_math/opengraph/facebook/image", function( $attachment_url ) { global $post; if ( isset( $post ) && $post->post_type == 'e-landing-page' ) { $custom_image = get_post_meta( $post->ID, 'rank_math_facebook_image', true ); if ( ! empty( $custom_image ) ) { return $custom_image; } } return $attachment_url; });
Additionally, I created a dedicated rank-math.php file and linked it in functions.php using require_once.
Cloudflare Settings:I reviewed and adjusted the Cloudflare settings:
Set up a Page Rule for the subdomain with a “Cache Level: Bypass” rule.
Enabled SSL/TLS settings in “Full (Strict)” mode.
Verified that Rate Limiting and other potential blocks were not enabled.
Facebook Debugger:I used Facebook’s Sharing Debugger and confirmed the following:
The Open Graph tags (og:image, og:title, etc.) are correctly set.
The response code from my server is 429, which may indicate a rate-limiting issue.
Other Checks:Verified that the image is publicly accessible via its URL.
Cleared all cache (on the website and Cloudflare) to ensure no cached responses interfere.
Ensured the image meets Facebook’s recommended specifications (dimensions, file size, etc.).
Despite all these steps, the OG image still fails to display correctly, and the Sharing Debugger shows the same issue. This problem has been reported by other users in forums and appears to be specific to how RankMath manages Open Graph settings for custom post types.Could you please:
Verify if this is a known issue with RankMath’s Open Graph settings for custom post types?
Provide any additional guidance or solutions to resolve this persistent problem?
I greatly appreciate your support and hope we can find a solution together. If you need access to my website or further details, please let me know.Thank you in advance for your time and assistance.
Kind regards,
Yavor Gerdzhikov
The ticket ‘Persistent Issue with Open Graph Image Not Displaying Correctly on Facebook’ is closed to new replies.