Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a page which should contain text and several images related to this text.

I'd like to show only one image on the page and let the user change the image by clicking a "->" button (via JavaScript).

  1. Will all of those images be indexed by Google (and others)?

  2. How will Google decide which image to show to the user, as they all have the same position on the page, same text, description and other tags?

Or could you suggest a better solution?

share|improve this question
add comment

1 Answer 1

Do this in reverse: show all the images, and via JavaScript (onload) hide the ones you don't need.

As for telling Google what image to use, you can do such things with structured data - see this for guided help with that.

share|improve this answer
    
Thank you all for: 1) idea to show all images first and hide ones upon page load complete 2) for pointing me to such a great Google's tool –  Roman Matveev Jan 15 at 16:40
    
@RomanMatveev No problem. Remember to mark the answer as correct if it solved your problem. –  Rodolfo Jan 15 at 16:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.