Persistent Issue with Open Graph Image Not Displaying Correctly on Facebook

#943851
  • Resolved Yavor Gerdzhikov
    Rank Math free

    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

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Please share the affected URL so we can check as well. You can add it to the sensitive data section by editing your first post

    Sensitive Data Section

    It is completely secure, and only our support staff has access to that section.

    Looking forward to helping you.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Persistent Issue with Open Graph Image Not Displaying Correctly on Facebook’ is closed to new replies.