Site running Google Cloud CDN –
According to numerous test is not Caching webp images – potentially all images.
This was corroborated with GTMetrix.
Initially, I used the Cloud CDN configuration of "Cache Static Content".
and later upgraded to "Use origin settings based on cache-control headers"
Current Cache Settings:
I am still seeing images, particularly webp not being cached by CDN.
I have also updated the .htaccess file to increase the TTL for webp.
How can I get these images cached properly in cloud CDN?
2
Answers
That GTmetrix report is simply wrong. They apparently don’t correctly detect use of Cloud CDN. I see cache hits from Cloud CDN for images such as /images/banner.webp.
There’s information on troubleshooting cache misses at https://cloud.google.com/cdn/docs/troubleshooting-steps#responses-not-cached that you can use to double check.
Just adding to elving‘s answer – the report is wrong – your site is using CDN for images too.
I’ve fallowed official documentation on troubleshooting GCP’s CDN.
Just run
curl -s -D - -o /dev/null https://mydoginsurance.com.au/images/banner.webp
and you should get:and when I ran it again a few minutes later:
Third last line is
age: 223
which means that this reponse was served from cache created 223 seconds ago;