title: Rails - restrict URL access to images?
body: <p>I'm working on a Rails app and using the restful-authentication plugin. The app will include user images. Only users who log in will be able to browse, but I wondered if I can also restrict direct URL access to the images to only allow logged-in users.</p>
  
  <p>In other words, even if you know that an image is at <code>thesite.com/user1/foo.jpg</code>, you can't see that image unless you're logged in. I know this could theoretically be done in the Apache config, but the only way I know would involve manual editing of those files, which wouldn't scale.</p>
  
  <p>Is this possible? Would it make more sense to just move the photos out of the <code>public</code> directory? (I'm not sure if that has any performance implications, as <code>public</code> is generally used for static content.)</p>