WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Change the "og image" property (8 posts)

  1. carollynn
    Member
    Posted 4 months ago #

    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/

  2. sdaveCL
    Member
    Posted 4 months ago #

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

  3. carollynn
    Member
    Posted 4 months ago #

    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.

  4. baldruus
    Member
    Posted 4 months ago #

    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.

  5. BitSin
    Member
    Posted 4 months ago #

    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?

  6. sdaveCL
    Member
    Posted 4 months ago #

    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);
    }
  7. _alexsmith1
    Member
    Posted 4 months ago #

    Thanks sdaveCL, your snippet worked for me!

  8. baldruus
    Member
    Posted 4 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.