Drupal 7 CDN Module not altering URLs for themed Pages
The problem is that you are not using the Drupal API.

The CDN module needs to be able to alter the path from your Drupal site to your CDN.  It does this by catching the URL via hook_file_url_alter(), and changing it.

The proper way to to make a URL in this case is with file_create_url().  Something like this should work

function MYTHEME_preprocess_page(&amp;$variables) {
  $path = drupal_get_path('theme', 'MYTHEME');
  $variables['mysrc'] = file_create_url($path . '/images/v1/image1.jpg');
}


And then in your theme you would use

&lt;a href="#"&gt;&lt;img src="&lt;?php print $mysrc; ?&gt;" width="380" height="197" /&gt;&lt;/a&gt;


However, as Mołot suggests, using a proper theme function to make a renderable image would probably be best.