Google & Lightbox JavaScript: Can GoogleBot Index Images in Lightbox JS?

Dec 28, 2009 • 8:07 am | comments (2) by twitter Google+ | Filed Under Google Search Engine Optimization

A WebmasterWorld thread has discussion around getting Google to index a popular image feature sites use to show off images on their web site. It is called Lightbox JS and it basically uses JavaScript to open up a neat larger view of the image on the page.

I use it on many sites, but you can see a quick example on the RustyBrick Mobile Portfolio. Just click on the image and it opens up a larger picture of that image. Here is a screen capture showing the larger image as it overlays on top of the page:

Lightbox & Google

The issue is, GoogleBot is having a tough time capturing these images in their index. WebmasterWorld administrator, Tedster, explained:

I've been up against the same challenge. Even though regular Google search is aggressively discovering URLs and content by spidering JavaScript, apparently the image bot is not so inquisitive at this point. This surprised me, because there are many images being displayed through Lightbox scripts these days.

Yes, GoogleBot is able to execute JavaScript, but is GoogleImageBot able to at the same pace?

Tedster is exploring other ways to get GoogleBot to index Lightbox JS. He tried the following method, but it doesn't seem to work:

My latest attempt involves making the anchor part of the link a thumbnail image - but the thumbnail is not just a smaller version of the larger image. I use the same exact image file for the anchor, but I resize it on the the page with the HTML width and height attributes. This means that the page loads more slowly, but at least the image bot gets a direct <img src=[url]> style mark-up.

If you have a solution, let us know.

Forum discussion at WebmasterWorld.

Previous story: Porn on Google Image Search with Strict Search On



12/28/2009 01:35 pm

In general, Lightbox is not a problem. In HTML, the link to the image is simple and doesn't require JavaScript crawling. For example, from your page (with [ instead of the other brackets): [a href="/portfolio/53_alt1.jpg" rel='lightbox[port_images53]' title="RustyBrick Mobile Portfolio Portfolio Image"]Portfolio[/a] .. that's a normal link to your image. Lightbox uses JavaScript to make it look nicer for browsers that support it, but for those without JavaScript they should be just as usable. That said, without being able to look at explicit URLs it's pretty much impossible to say exactly what is happening :-). Perhaps there's a thread in our Help Forums where we could take a look?

Barry Schwartz

12/28/2009 01:52 pm

Thanks John, I appreciate the heads up on that. I'll try to get you examples.

blog comments powered by Disqus