
Originally Posted by
JimBinCT
Thanks for responding. In the code, the images are not called using the IMG tag as seen here...
imagearray: [
["http://www.dynamicdrive.com/dynamicindex4/pool.jpg"],
["http://www.dynamicdrive.com/dynamicindex4/cave.jpg"] //<--no trailing comma after very last image element!
],
Do search engine crawlers read and use code hidden with <!-- --> tags? Is there another way to hide it from the viewer without hiding it from the search engines? I guess that's a question for another forum.
I have hundreds of images on the site. I'd like to not have to add sort of duplicate code to the pages unnecessarily.
I'm sure there is a way. somehow. Thanks.
No, search engines do not read and index images stored inside JavaScript image arrays. What you'll need to do is for each image inside the array, create separate IMG tags with all the meta data you want, enclosed in a hidden DIV, something like:
Code:
<div itemscope itemtype="http://schema.org/ImageObject" style="display:none">
<h2 itemprop="name">Beach in Mexico</h2>
<img src="http://www.dynamicdrive.com/dynamicindex4/pool.jpg"
alt="Sunny, sandy beach."
itemprop="contentUrl" />
By <span itemprop="author">Jane Doe</span>
Photographed in
<span itemprop="contentLocation">Puerto Vallarta, Mexico</span>
Date uploaded:
<meta itemprop="datePublished" content="2008-01-25">Jan 25, 2008
<span itemprop="description">I took this picture while on vacation last year.</span>
</div>
Bookmarks