title: PHP Dynamic Image Resizing (on the fly)
body: <p>At the moment our website stores 2/3 fixed image sizes. These are produced at upload time and distributed via our CDN. However we need to implement a more flexible solution, we have mobile and tablet apps in development that require a multitude of different sizes. Our proposed solution is to create a PHP script that can accept an image identifier (id/type/url etc) and size contraints. The script can then create the image on the fly and cache it for the next time.</p>
  
  <p>Is this a feasible solution?</p>
  
  <p>Also at the moment the CDN shields our web server from considerable load. Is there anyway to incorporate the CDN into this process once the image has been generated once? The only way I can think of doing it, is having the script return a URL to the image resource, but then the client needs to make 2 HTTP requests. A redirect could be quicker, but isn't that still bad practice for speed?</p>