As of Chrome 40, the srcset
attribute is supported, but will Google index the images within it?
3 Answers
So I set up a test page here.
Using Webmaster Tools' Fetch As Google feature, I saw that Google doesn't pick up the image declared in the img
's srcset
attribute:
However, adding the JavaScript Polyfill Picturefill I was very surprised to see that Google now does pick up the image declared in the srcset
attribute. This means Google is running the JavaScript.
It's also interesting to note that Google gets the visitor rendering wrong - a visitor does see the second image.
I've submitted the page to be indexed and will add the result here.
-
As far as I know, Fetch as Google is JS enabled. And yes Google does utilize its JS crawler to crawl sites. But somebody tested it is much less frequent as disabled one– tom10271Commented Jan 10, 2018 at 1:26
-
Did you ever find out if adding Picturefill allowed Google Images to index the larger version? Commented Aug 5, 2018 at 12:18
-
Update from Februari 2018. It seems like Google is still picking the src attribute initially. I added the higher resolution to the Image XML sitemap and it looks like Google is picking up those.
On a website I've published some years ago, I'm using srcset
attribute on images but it seems google is not picking up those images (although it indexes the one on src
attribute).
Check this query site:psicoanalista.albertofernandez.com.ar
on Google Images.
As you can see, only the smaller images (which are the ones I specified in src
attribute as a fallback) are being indexed.
I'd like to find some official Google statement on this topic.