How to set a microdata image property, without letting the browser download the image?

(Note: a now deleted answer suggested the use of the meta element)

Instead of the meta element, you should use the link element, because the content is a URI:

When a string value is a URL, it is expressed using the a element and its href attribute, the img element and its src attribute, or other elements that link to or embed external resources.

It’s even required:

If a property’s value, as defined by the property’s definition, is an absolute URL, the property must be specified using a URL property element.

So it should be:

<link itemprop="image" href="https://stackoverflow.com/questions/19709967/static/image.jpg" />

Leave a Comment