Jed
Jed

Reputation: 1733

Facebook og: image appears blank

I currently having a problem with FB OG image on Feed status of https://3dl.aut.ac.nz/. On profile status. This works fine. It appears that the bug is only happening on HOME(news feed page) status

Facebook Image Bug

The site is built in wordPress. Normally I don't stuck on og image on my previous works on WordPress. On fb object debugger, the site has the correct og image and seems no problem at all.

I suspect its because im using secure server? (https://) Also same thing happens if I try, http://3dl.aut.ac.nz/ (http).

I investigated this issue and found another similar thread on stackoverflow thread. The thread says that this has been an issue with https. However, the facebook.com has a thumbnail when posted the link on FB status.

Is this issue has something to do with the server settings?

Any help will be greatly appreciated.

Upvotes: 2

Views: 5056

Answers (4)

PLI52KA
PLI52KA

Reputation: 19

In my case, converting a PNG graphic with transparency to no transparency fixed the error.

Facebook API debug error image

Upvotes: 0

panepeter
panepeter

Reputation: 4252

Please bear in mind that the facebook scraper works asynchronously and will need some time (during my tests around 10 minutes) to be able to display an image after seeing it for the first time.

For more information, here's a more thorough answer on a similar problem.

Upvotes: 0

Sam Michel
Sam Michel

Reputation: 106

Ran into the same problem myself. You're trying to share from a secure site using Yoast's Wordpress SEO plugin. Unfortunately, it doesn't properly handle the meta tags for secure images. Yoast includes:

<meta property="og:image" content="https://image-url-here" />

Facebook doesn't like that, but there's an easy fix, by adding:

<meta property="og:image:secure_url" content="https://image-url-here" />

I wrote up a blog post on how to hook into the plugin's wpseo_opengraph_image hook to handle this automatically.

Hope it helps.

Upvotes: 2

andyrandy
andyrandy

Reputation: 74004

https/http should be no problem, i suspect that the image is just too broad. Always use the correct aspect ratio and size: https://developers.facebook.com/docs/sharing/best-practices#images

Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.

Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping.

Upvotes: 1

Related Questions