2

I have a product page that uses Microdata. At the moment the itemprop="image" attribute is specified on the first thumbnail from my thumbnail gallery. What I'd like to do is specify it for the high-res image I have.

The trouble is, that's not actually displayed on the page, it's loaded via JavaScript using a lighbox. I know I can do something like:

<img itemprop="image" src="/img/high-res.jp" style="display:none" />

and the image won't show and it's tagged as the product image. But, of course the image is still download.

Any way I can specify itemprop="image" on an image but not actually download the image?

I tried changing <img> to <span> but the testing tool didn't recognise it.

unor
  • 92,415
  • 26
  • 211
  • 360
BigBadMe
  • 1,754
  • 1
  • 19
  • 27

1 Answers1

4

Perhaps the link element would be useful here - it's not displayed in the rendered HTML, but it is available in the HTML source and therefore available to JavaScript:

<link itemprop="image" href="/img/high-res.jpg">
Paul Watson
  • 361
  • 1
  • 3
  • 8