2

Related Github issue: https://github.com/browniebroke/gatsby-image-gallery/issues/844

So I'm using Gatsby and an image gallery. The gallery generates two images, a thumbnail and the gallery image. The thumbnail is a low resolution file and the gallery image is high resolution.

<img srcset="example-320w.jpg 320w,
       example-480w.jpg 480w,
       example-800w.jpg 800w"
   sizes="(max-width: 320px) 280px,
      (max-width: 480px) 440px,
      800px"
   src="example-800w.jpg" alt="responsive web">

Is there any way to tell google images to skip the low res thumbnail and instead take the gallery image? Or for the sample code above: Is there any way to tell which image google chooses?

2 Answers 2

3

No, there is no way to request that Google chooses a specific image. Yes, you can predict which one Google will index.

As Trey touched on, Googlebot will always index the image in your src attribute and ignore srcset.

See more information in this related question, where it was empirically tested:
Does Google index images declared using 'srcset'?

0
1

Google will use the image in your standard <img src=""> element

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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