1

If we set sizes="(max-width: 450px) 50vw") of the image but later we will expand this image to full width. Will google penalize us for it as we expanded the image to 100vw but told Google to download 50vw via sizes?

<img src="/images/ac10.jpg" srcset="/images1/ac10-m4.jpg 800w ,/images/ac10.jpg 1100w" sizes="(max-width: 450px) 250px,1100px">

I want to counter higher DPR devices via the sizes attribute. If we set sizes="(max-width: 450px) 100vw") then on iPhoneX (DPR=3), Google will download (375*3 or 1125px) wide image which is huge. But if we set sizes="(max-width: 450px) 50vw") and later stretch image to width:100% then it will download (1125/2 px) wide image which will dramatically improve load time.

I want to know if this is cheating in Google's eyes as we are tricking google to download a 50vw size image and later we are using it as a 100vw size image. Will it affect SEO?

1
  • I think you must go to the google support forum. Commented May 13, 2021 at 5:12

1 Answer 1

3

I wouldn't worry about it at all.

The biggest red flag for Google is if you're checking the User-agent and delivering different content specifically for Googlebot.

When it comes to cloaking Google is looking for deceitfulness. What you're doing doesn't sound deceitful, it sounds more like a progressive enhancement if anything.

If you're using Javascript to switch out the images, then Google probably is picking it up anyway, which should be fine.

2
  • I will not use JS. I want to download the 50vw size of the image through the sizes attribute and later stretch it using CSS like this img{ width:100%}. Commented May 13, 2021 at 11:53
  • @GauravYadav I see. Still this doesn't sound like it will be an issue.
    – Jake 1986
    Commented May 13, 2021 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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