0

I am having a bit of difficulty finding the correct way to call images from the CDN that I use - Photon from Jetpack

Prevouisly - called them direct from the upload source wp-content/themes/mytheme/images/image.png

but when viewing page source, the images were delivered from my media folder,

I now call the images from

https://i0.wp.com/www.mywebsite.co.uk/wp-content/themes/mytheme/images/image.png

The problem I am getting now is... when I run a test with GT Metrix it tells me to

Serve resources from a consistent URL

and when I look further I get a number of results similar to:

https://i0.wp.com/www.mywebsite.co.uk/wp-content/themes/mytheme/images/image.png
https://i2.wp.com/mywebsite.co.uk/wp-content/themes/mytheme/images/image.png

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 2.8KiB.

https://i0.wp.com/www.mywebsite.co.uk/wp-content/themes/mytheme/images/image2.png
https://i2.wp.com/mywebsite.co.uk/wp-content/themes/mytheme/images/image2.png

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 2.9KiB.

notice, the bottom one is served from i2 rather than i0 which I stated in my code and also in my website link, it has dropped the www.

Is there a correct way to call images from the CDN to avoid this

Your Answer

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

Browse other questions tagged or ask your own question.