• carollynn

    (@carollynn)


    Under the social settings I have set the default image but I notice that in addition to the primary, there are a bunch of og images, some of which I do not want to be used. Is there a way to remove all of those image attributes and ONLY use the default?

    https://wordpress.org/plugins/wordpress-seo/

Viewing 9 replies - 1 through 9 (of 9 total)
  • sdaveCL

    (@sdavecl)

    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>.

    Thread Starter carollynn

    (@carollynn)

    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.

    baldruus

    (@baldruus)

    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.

    BitSin

    (@bitsin)

    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?

    sdaveCL

    (@sdavecl)

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

    http://webgilde.com/en/wordpress-seo-facebook-image-open-graph/

    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);
    }

    _alexsmith1

    (@_alexsmith1)

    Thanks sdaveCL, your snippet worked for me!

    baldruus

    (@baldruus)

    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: http://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/

    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.