Assuming you have the following basic CDN setup;
Origin: origin-static.mywebsite.com Origin Pull (Customer Server)
Caching Policy: Honour Caching Headers set max-edge
CDN CNAME URL: yourwebsite.something.cdnprovider.net
In order to have objects called from the CDN, after CNAME you’ll need to replace the origin path inside your tags with the new “Host” or CDN CNAME URL.
If you use the “Host” make sure you have already CNAMED the “Host” to the CDN CNAME URL by adding a new DNS record into your DNS settings. If the “Host” has not been CNAMED content will not be delivered from the CDN.
Here’s an example of CDN integration:
<img src=”mywebsite.com/path/to/image.jpg” />
<img src=”cdn.mywebsite.com/path/to/image.jpg” />
<img src=”something.cdnprovider.net/path/to/image.jpg” />
The same example can be followed with other types of static cacheable content such as CSS, JS, SWF and any other you wish to delegate to CDN.