og:image – Instead of Fallback the first image on page is grabbed. How to stop?

#160721
  • Resolved Simon Reuvers
    Rank Math free

    Hello,

    I have a og:image defined in settings “gobal meta”. But instead of this image to be shown, the first image on page is getting grabbed. How can I stop this behavior? The current behavior makes no sense for me.

    ALl the best

    Simon

Viewing 9 replies - 1 through 9 (of 9 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thanks for contacting us and we regret the inconvenience caused!

    Could you please share the URL of the page you are facing issues with?

    Looking forward to helping you.

    Thanks!

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Prabhat
    Rank Math agency

    Hello,

    Thanks for the details!

    I visited the page and found that the OG image is set and it is your-site.com/wp-content/uploads/2021/01/grafik-tuev-siegel-001-lexoffice-rechnungsprogramm-buchhaltungssoftware.png. This is the same image that I found on your homepage’s OG also.

    I then tested the page using the Facebook Debugger tool and it seems that the same OG image is getting picked. Please see the screenshot available in the Sensitive Data section of this ticket.

    Could you please check again and let us know how it goes.

    Thanks!

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hey,

    thats the problem. The image in the screenshot of facebook debugger (you sent me) is a different one, then defined in the fallback settings (i send you a screenshot). I didn’t define the image that is shown in the facebook debugger in any setting (on the page or as featured image)

    Hello,

    Thank you for the follow-up.

    The default social sharing image shows up only when:

    1. You have not uploaded any featured image to a post
    2. You are not using even a single image inside the post
    3. You have not used any image in the social tab:

    If any of these are true, then that image will be used instead of the default social image. If you wish to force the use of default social image, please paste this code in your theme’s functions.php file:

    add_filter('rank_math/opengraph/pre_set_content_image', function() {
    	return true;
    });

    I hope that helps. Thank you, and looking forward to your update.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Ok i understand, but then there is still a bug in the system. The preview of rankmath for the page shows a different image than the facebook debugger (see my last screenshot).

    All in all this is quite inconvenient. Other Seo-Plugins do have a option to decide which image should be shown in which fallback-order.

    Hello,

    Thank you for that additional information.

    I’ve further checked the affected URL you have shared, and it seems that og:image tag is not getting updated by the fallback you have set. Please see the screenshot in the designated Sensitive Data section.

    In this case, assuming you have already updated all your plugins and theme, you must check why Rank Math isn’t able to print the og:image tag by following this troubleshooting guide.

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Let us know if you find the culprit.

    I hope that helps. Thank you, and looking forward to your update.

    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 9 replies - 1 through 9 (of 9 total)

The ticket ‘og:image – Instead of Fallback the first image on page is grabbed. How to stop?’ is closed to new replies.