html - Using a different image for microdata that isn't displayed in the article? -


i'm working on website has bunch of articles.

i'm looking find way add image invisible without putting inside hidden div.

when users add article, there "main" image of specific proportions users upload (which i'd use microdata). there other images tossed in carousel upload.

at moment way can microdata testing tool use image doing following:

<div class="hidden">     <img itemprop="image" src="link/to/image.jpg" /> </div> 

what i'd use meta tag, doesn't seem work:

<meta itemprop="image" content="link/to/image.jpg"> 

i haven't found relevant microdata, although open graph , twitter cards support meta tags images. know whether possible microdata or not, or whether "that" important?

i don't want have hidden image adds load times if possible!

you can use json-ld instead of microdata.

that way add want in json data not displayed in page, recognized search engines.

here example taken http://schema.org/creativework:

<script type="application/ld+json"> {   "@context": "http://schema.org",   "@type": "creativework",   "name": "my article",   "image": "http://your.image.url.com" } </script> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -