As of now, if a post contains a lot of images, the plugin will create og:image tags for each image. There is no limit. When posting articles with a boatload of images, the meta tag gets too heavy, creating a massive page. Ideally, it would be best NOT to create og:image tags when there is a featured image. And when there is no featured image, the best way would be to limit the number of og:image tags created by the plugin.
For my site, I edited the class-opengraph.php file near line at line 237 and put a small condition, where if the number of images is more than 5, it breaks out of the foreach loop.
It would be great if there was an option in the admin page, where it asks how many images should be generated if there is no featured image. Then the setting would control how many images get created in the og:image tag.
Hopefully something like this will be available in a future release, because this is important for any site…
- The topic ‘[Plugin: WordPress SEO by Yoast] Issue with OpenGraph implementation: og:image’ is closed to new replies.