OG:Image takes first image of content

#415743
Viewing 3 replies - 1 through 3 (of 3 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.

    The fallback/default social sharing image (Titles & Meta) 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 the default social image, please paste this code into your theme’s functions.php file:

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

    Let us know how this goes.

    Thank you.

    Hi Reinelle,

    thank you for your help. With the code snippet it works like a charm.

    Kind Regards
    Richard

    Hello,

    You’re welcome.

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘OG:Image takes first image of content’ is closed to new replies.