Support » Plugin: Yoast SEO » Change the "og image" property

Viewing 9 replies - 1 through 9 (of 9 total)
  • Same problem here. With an image heavy post that I have I can’t get Google+ to pick up the Featured Image because there are too many og:image tags in the <head>.

    Exactly… you said it better than I did. The problem is that my primary image still doesn’t show in shares on Facebook or Google, as you said. But I got a whole bunch of useless ones. Would love to find out if anyone has a solution.

    I’m having the same problem here. Primary image is not showing correctly when I share the post on Facebook. Sometimes it’s showing the image from an older post (like it would be cached) or sometimes is not showing any image.
    I’m sharing posts with Jetpack plugin.

    I’m also having same problem. Using “Facebook” plugin along with WPSEO with Facebook Social settings turned on.

    Example: Facebook debugger of my URL

    When sharing on Facebook, it’s picking the smallest og:image tag!

    Any workaround?

    This post describes how to strip all but the featured image og:image tag of the post from the <head>:

    Manipulating WordPress SEO’s choice of Open Graph image

    Takes a snippet of code added to your theme’s functions.php to do it.

    The exact snippet I added was this:

    add_filter('wpseo_pre_analysis_post_content', 'mysite_opengraph_content');
    function mysite_opengraph_content($val) {
    return preg_replace("/<img[^>]+>/i", "", $val);

    Thanks sdaveCL, your snippet worked for me!

    These days I tried to solve in different way.
    I disabled automatic posting from Jetpack and installed a new plugin to auto-post to facebook:

    Now it works like a charm with WordPress SEO.

    Within the Yoast plugin you can simply switch it. Go to the right page and search for the social tab at the wordpress seo for yoast there you can change the og:image

    marvin_edward the concern is not how to set a default og:image.

    The problem is a bunch of og:images automatically added to the <head> which prevents social networks from picking up the one you want when sharing a page/post.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change the "og image" property’ is closed to new replies.