Yoast SEO
Multiple og:image Tags? (3 posts)

  1. Frederic Pilon
    Posted 2 years ago #

    I bumped into a bug this morning.

    When I have an article with a featured image + another image in the content, I have two og:image tags in my header, resulting in Facebook proposing 2 images to my users when they share said page.

    This wouldn't pose problem if it wasn't for the fact that between both images, Facebook takes the 2nd one, the one that is in the article and isn't the featured image.

    So is there a way to give priority to the featured image and/or to limit Yoast SEO to the featured image for it's og:image tags?


  2. Thomas Maier
    Posted 2 years ago #

    you can disable using images from the content by WordPress SEO with the following lines in your functions.php:

    add_filter('wpseo_pre_analysis_post_content', 'mysite_opengraph_content');
    function mysite_opengraph_content($val) {
        return '';
  3. Girovago
    Posted 2 years ago #

    Thanks for your message.

    There's a way for use the title of WP instead the tag title when i share a post on Facebook?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic