Trying to test/confirm that client hints are working for our images

What is the name of the domain?

example.com

What is the issue you’re encountering

I’m trying to use client hints to help return client-optimized images for our website. I’m under the impression that using client hints the output image will be appropriately sized for that client. For example, if i have a desktop client, the image will be suitably sized for a desktop computer. If i have a mobile phone, it doesn’t need the image to be so ‘large’ and will be optimized both in width/height and file size to be appropriate for the mobile device. I’m on the PRO paid plan. So, using CURL is there anything that can confirm that the specific client hints are working/doing this? Do i need to add a VARY header so it will vary by accept + my client hints? e.g. curl -I -H “Accept: image/webp” -H “Sec-CH-Viewport-Width: 1920” -H “Sec-Ch-DPR: 1” -H “Sec-Ch-Width: 200” -H “Vary: Accept, Sec-CH-Viewport-Width, Sec-CH-DPR, Sec-CH-Width” example.com/image.png

What steps have you taken to resolve the issue?

I’ve tried to use CURL to see if there’s any size difference but it looks like the image size is the same regardless of the hints. I can also see a CF-Cache HIT which is good … but is it? I really though each client hint would render a specific image for that client hint.

This topic was automatically closed after 15 days. New replies are no longer allowed.