title: appending cdn to images in mvc app
body: <p>I am working with an asp.net mvc 4 application. I would like to set up my sites images to be rendered via a cdn.</p>
  
  <p>Is there any mechanism within MVC to set up image paths resolving to a cdn? I want the cdn to be dynamic so I can configure it via app settings.</p>
  
  <p>I have a couple ideas open to me</p>
  
  <ul>
  <li>Use a Html Helper to resolve all images with a cdn. Only issue with this is that I use spring.net dependency injection and dont believe its straight forward to inject in to a static class</li>
  <li>Create a attribute that I place on my controller that examines the html output from my views, use a regex to find all non resolved domains and resolve them. Concerned about performance on this</li>
  <li>Create an action result that is returned from my view that does similar to my previous point.</li>
  </ul>
  
  <p>Any ideas/tips on this?</p>