title: Dynamically create image thumbnails (using django)
body: <p>I would like to dynamically create thumbnails based on parameters in the URL. For example, <code>http://mysite.com/images/1234/120x45.jpg</code> would create a <code>120x45</code> thumbnail for image id <code>1234</code>.</p>
  
  <p>The obvious solution to this is to have a django view which does the following:</p>
  
  <ol>
  <li>Look for a previously cached version of the image at this size.</li>
  <li>Create a thumbnail if it's not cached (some logic for locking so that only 1 process creates the thumbnail and other processes wait).</li>
  <li>Pipe the results through django.</li>
  </ol>
  
  <p>That should "work", but I'm concerned about performance. I don't like the idea of using django to serve static content. What are some other ways to accomplish this problem?</p>