Question

Testing posting a snippet on Google+ with following HTML -

<!DOCTYPE html>
<head>
    <meta property="og:image" content="http://i.imgur.com/le2WbeU.jpg" />   
    <meta itemprop="image" content="http://i.imgur.com/le2WbeU.jpg">
</head>
<body>    
</body>
</html>

What I see is: enter image description here

Looking at network traffic I see a failed request: enter image description here

UPDATE: Looks like it was a caching problem. Once I appended a query string on to the URL, I got the image to pull up. I must have had a bad URL to an image the first time and it cached that bad URL request.

Était-ce utile?

La solution 2

Looks like it was a caching problem. Once I appended a query string on to the URL, I got the image to pull up. I must have had a bad URL to an image the first time and it cached that bad URL request.

Autres conseils

I don’t know if it causes the error, but you might want to use link instead of meta if the value is a URI.

  • The HTML5 spec defines that the meta element:

    […] represents various kinds of metadata that cannot be expressed using the […] link […] elements.

  • Microdata also explicitly requires it:

    […] the property must be specified using a URL property element


Also note that you don’t have created an item in your Microdata, so the image property is not defined (unless an item is created on the html start tag, which is missing in your example; or you reference it via itemref from the body).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top