By Badger

2015-05-20 17:40:14 8 Comments

I'm developing a WordPress site and using the yoast seo plugin to generate an og image on a dynamic page. However, I think this is not related to that. The og image link appears perfectly, but if I click on the share button, no image is included unless I have already clicked on the share button before, or used the facebook developer tool to scrape the page first.

Is this a facebook issue, or a server issue perhaps?


@CBroe 2015-05-20 22:39:15

You can avoid this by either getting your content “pre-scraped” by triggering a scrape via API as soon as you publish it, or by specifying the image dimensions via OG meta tags as well.

When content is shared for the first time, the Facebook crawler will scrape and cache the metadata from the URL shared. The crawler has to see an image at least once before it can be rendered. This means that the first person who shares a piece of content won't see a rendered image

There are two ways to avoid this and have images render on the first Like or Share action:

  1. Pre-cache the image with the URL Debugger
    Run the URL through the URL debugger to pre-fetch metadata for the page. You should also do this if you update the image for a piece of content.

  2. Use og:image:width and og:image:height Open Graph tags
    Using these tags will specify the image to the crawler so that it can render it immediately without having to asynchronously.

The second one is probably easier to implement; although you might have to modify your plugin that generates the OG meta tags (or choose a different one) if it doesn’t provide an option to output the image dimensions as well already.

@Badger 2015-05-21 13:42:35

That's great, thanks. As there are a lot of different pages and I don't even know what their urls are, I'll do it the second way, I can use the wpseo_opengraph_image_size() filter to provide the dimensions.

@jchwebdev 2016-09-21 18:28:24

As of today, method #2 does -not- work for me. Still requires using the URL Debugger (ie. method #1).

@CBroe 2016-09-21 18:48:55

@jchwebdev, ok, but that probably means that you have a different problem, so lets continue that in your question,…

Related Questions

Sponsored Content

24 Answered Questions

[SOLVED] FB OpenGraph og:image not pulling images (possibly https?)

12 Answered Questions

[SOLVED] How does Facebook disable the browser's integrated Developer Tools?

1 Answered Questions

facebook sharing in wordpress, showing unusual description with no image

1 Answered Questions

Facebook share button not updating image

  • 2014-08-18 19:31:18
  • user2755541
  • 838 View
  • 0 Score
  • 1 Answer
  • Tags:   facebook

1 Answered Questions

[SOLVED] trying to customize the facebook share button

  • 2013-11-27 04:24:31
  • Abdul Shakoor Kakar
  • 444 View
  • 0 Score
  • 1 Answer
  • Tags:   facebook wordpress

Sponsored Content