facebook debugger open graph image not scraping on first attempt facebook debugger open graph image not scraping on first attempt wordpress wordpress

facebook debugger open graph image not scraping on first attempt


Here is the answer to this question from facebook:

The provided 'og:image' properties are not yet available because new images are processed asyncronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags

so the thing is, the first time, facebook is not sure about the image's dimensions so no image displays, on the 2nd run, the image is already cached so it can readily check the dimensions of image provided in 'og:image' property.

To make sure that facebook displays image on the first run, og:image:width and og:image:height properties are required.


According to the Facebook "sharing best practices", Facebook needs to scrape the page at least once by someone clicking on it to cache the image. Subsequent shares will then be able to display the image.

Facebook's suggested solution is to manually enter the URL using the debugging tool to pre-cache the image:https://developers.facebook.com/docs/sharing/best-practices#pre-cache-images


I solved a similar issue. I am also using WordPress with Cloudflare.

I installed Facebook Open Graph, Google+ and Twitter Card Tags (1.5.2) to add OG Tags to my posts. I used the plugins update Facebook Open Graph Tags cache when saving the post option to prime Facebook.

But, Facebook still did not scrape the images from the OG Tags even from a primed cache. (On subsequent tests using Facebook Debugger tool Facebook did not even scrape the OG tags at all. Using the "See exactly what our scraper sees for your URL" tool Facebook was only scraping a few lines from the header and not the full header html).

For some reason beyond my humble comprehension disabling Cloudflare Railgun solved the problem for me.

Railgun accelerates the connection between each CloudFlare data center and an origin server so that requests that cannot be served from the CloudFlare cache are nevertheless served very fast.

You can find this setting on the CloudFlare settings page for your domain.

Hope this is helpful.