Can't fix: 'og:image' property should be explicitly provided, even if a value can be inferred from other tags
Asked Answered
M

13

60

I have a website that triggers a warning when clicked through a link shared on Facebook. The warning says:

Possible problem with this link

We have detected that this link: http://www.example.online/ may be malicious. To keep your account and device secure, only follow links you trust."

I ran the Facebook debug tool and I get the following error message:

Inferred Property

The og:image property should be explicitly provided, even if a value can be inferred from other tags.

I Googled this issue and I understand it is caused by some lack of meta information in the site header, but my site's code has the following in the header:

<meta http-equiv="etag" content="2efdc27c8967f14e2c829e601f7a1228"/>
<meta property="og:title" content="South Jersey Aerial Photograpahy"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://www.example.online/"/>
<meta property="og:image" content="https://static.example.com/media/56a444_9273e80a60684dc8b38e56025059f356%7Emv2_d_3200_1800_s_2.png"/>
<meta property="og:site_name" content="South Jersey Aerial Photograpahy"/>
<meta property="og:description" content="South Jersey Aerial Photography is South Jersey's premier aerial photography and aerial videography company. Fully licensed and insured. Contact us today!"/>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>

I have no idea how to fix this error message. The property metatag is clearly there.

Motorboat answered 9/1, 2017 at 17:11 Comment(2)
Read: https://mcmap.net/q/330506/-facebook-open-graph-error-inferred-propertyServais
The warning about that URL being potentially malicious has nothing to do with the Open Graph errors.Censure
W
57

In short, you should re-fetch your website information using this tool: https://developers.facebook.com/tools/debug/

Paste your URL and press Debug. Then either do Fetch, or press Scrape Again. This will refresh Facebook cache, and your html-page will be reloaded.

Some additional info: https://mcmap.net/q/330506/-facebook-open-graph-error-inferred-property

Willing answered 9/6, 2017 at 9:3 Comment(2)
No need of the url. See 'Time Scraped'. 'Scrape Again' button is there.Unguentum
Just tried, it does not work and the same problem presists. For some reasons, it does not fetch any of the OG tags on the site.Fulgent
H
13

Following the already mentioned link to the Facebook object debugger, make sure that your og tags are written RIGHT AFTER the opening <head> tag.

Not sure why this happens but I used to run into the exact same issue until I moved them right after it and then clicked once again on "Fetch new scrape information".

Hope this helps!

Heartstrings answered 14/12, 2017 at 17:38 Comment(1)
if the page has another canonical the validation will be on the canonical versionCrashaw
R
6

Check for og:url tag and see whether the url is correct or not. In my case the url was not correct and so it was causing this type of error.

Rags answered 19/2, 2019 at 12:11 Comment(1)
Wow! This was the problem!Interlining
F
5

Even if you have a proper OG tag on a page, can Facebook still ignored og:image value.

On my Magento 2 website, I use Magento 2 Facebook Open Graph by Magefan and had this issue too even all OG tags look good :-(

After I contacted them (magefan), they fixed the issue and released the module update v2.0.12

It turned out that Facebook only looks for og:image in the first 50Kbs of the page source. So if you are using inline CSS, or some JS in the the og:image will not be seen by Facebook. That was the reason in my case.

The solution is to put OG tags as high as possible in the node.

Fevre answered 15/2, 2022 at 9:45 Comment(0)
A
4

Ran into the same issue today. It would appear that it's a bug on Facebook's end.

Just by refreshing the Sharing Debugger will show me different error messages after each reload, including "Image Too Big", which clearly was not the case, and "Meta Tags In Body" which also was not correct.

As long as the correct image shows up in the Link Preview, I think you're good to go.

Acidhead answered 21/3, 2017 at 15:45 Comment(0)
S
4

Had same issue today

'og:image' property should be explicitly provided, even if a value can be inferred from other tags

somehow my linter replaced "(quotation mark) to ”(right double quotation mark), therefore https://developers.facebook.com/tools/debug/sharing/ was showing issue,

cause of that, these meta properties were not visible to fb-bot. After this correction it works fine

Syllabify answered 29/11, 2019 at 8:16 Comment(0)
K
4

OG tags should be property instead of name for those of you who copy/paste from other tags like twitter, who uses name.

Eg

  <meta property="og:image" content="..." />
  <meta name="twitter:image" content="..." />
Kun answered 15/9, 2022 at 18:35 Comment(0)
J
3
  1. Remember you need to add og:image:secure for "https"

2.og:image only works with "http".

Try

<meta property="og:image" content="http://example.com/image">
<meta property="og:image:secure" content="https://example.com/image">

Jockstrap answered 11/6, 2022 at 11:30 Comment(0)
P
2

Added the

<meta property="og:image:secure_url" content="https://abc/image.jpg" />

in order for the facebook debug to actually show my issue that the image was not 200x200. Corrected that and had to completely refresh the debug to resolve.

Psychosomatics answered 12/10, 2021 at 17:22 Comment(0)
L
1

If you're using a plugin like W3 Total Cache, Just purge your cache and go back to Facebook object debugger page mentioned by @Alex C and then click on Fetch new scrape information.

This solved the issue for me

Loud answered 30/11, 2018 at 16:3 Comment(0)
T
1
`<meta property="og:image" content="https://static.wixstatic.com/media/56a444_9273e80a60684dc8b38e56025059f356%7Emv2_d_3200_1800_s_2.png"/>`

<meta property="og:image:width" content="2500"/> <meta property="og:image:height" content="1330"/>

1200 pixels x 627 pixels The most frequently recommended resolution for an OG image is 1200 pixels x 627 pixels (1.91/1 ratio). At this size, your thumbnail will be big and stand out from the crowd. Just don't exceed the 5MB size limit.

Double check your img file size.

Tune answered 5/10, 2021 at 2:44 Comment(0)
Q
0

I had og:url content as http://... when my site always redirected to https://.... Updating this fixed the issue for me.

Quinque answered 29/7, 2020 at 17:12 Comment(0)
R
-1

I have had success by using https://developers.facebook.com/tools/debug/sharing/batch/ to invalidate the FB cache, then using https://developers.facebook.com/tools/debug/ to refresh it.

This seems to help if a page/post has been previously shared, say, and then an og image or other og element was added.

Respirator answered 5/1, 2021 at 16:40 Comment(1)
I'm still having issues getting the image after using the bebugging. Its weird how it works fine in one Github page but this new one won't get any images at all hope someone can help me on this please?Plight

© 2022 - 2024 — McMap. All rights reserved.