Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Jose Morales-Mendizabal
19,175 PointsGoogle Image Search results and Lightbox design pattern
Hey everyone, I have a question that relates to SEO and UI design. A common pattern a large array of images in a cohesive form in a page is to use a Lightbox component. The basic markup of a Lightbox image is as follows.
<a href="path/to/full-res-image.jpg">
<img src="path/to/thumbnail-image.jpg">
</a>
A link to the full-res image wraps a thumbnail version of the image. When the thumbnail is clicked, the link is triggered and the full version is overlaid in a modal.
Now, my questions pertains SEO, primarily Image search results. If the <img> tag that is on the markup in the document is linking to the thumbnail, will search engines just display the thumbnails on the search results? or is there a way to make the search engines follow the link and index the full version of the image?
Thanks!
1 Answer

Yorick Toma
742 PointsWell it will show the thumbnail because well.. the first one is not an image but a anchor
Jose Morales-Mendizabal
19,175 PointsJose Morales-Mendizabal
19,175 PointsThat's what I figured. Although I had hope Googles algorithm had gotten a bit more intelligent. Will have to look into perhaps using xml sitemaps