Change image urls so they are not based on my site


#1

All my images on my woocommerce site are curently showing this path
mydomain.com/image.jpg

How do I change the urls so that images are not directly associated with my domain?
Thanks
Arthur


#2

What URL would you like them to use? One option would be to use a standard CDN (I like KeyCDN). Your site can still use standard URLs, but the CDN would pull the images from your site and the URL would become something like woo.keycdn.com/image.jpg


#3

Were you planning to host them on another server? If so you’d add the other host to Cloudflare and orange cloud it and then change the relative URLs in your code to point to it.

e.g. images.example.com/images.jpg.

Can I ask what you’re trying to achieve by not having them directly associated with your domain?


#4

For what i know is good to point images and assets on CDN, maybe i’m wrong.
I’m sure he’s also afraid of duplicate content problems.


#5

Cloudflare acts as a transparent CDN so example.com/images.jpg would be cached without needing to specify a different URL for the content. It will also be more performant that way as it can take advantage of http2.