title: Can I use Django to prevent direct access to an image file?
body: <p>I'd like to prevent my web users from simply right clicking an image and copying/sharing the URL.  Certain authenticated users have access to certain images, and I'd like to enforce this as much as possible.  Non authenticated users should have no access to image files.</p>
  
  <p>It's generally recommended to avoid storing/fetching images from a DB, due to performance issues, from what I have read.</p>
  
  <p>I've considered having a function that reads the file (server side, in python) and inserts it into the webpage (base64 encoded, possibly, or some other way) in the Django view functions.  Combined with an .htaccess file that denies external requests, this would likely work, but it seems like it'd be resource intensive. </p>
  
  <p>Is there any other options for enforcing this rule?  I realize users can screenshot, save images, etc, but it's my responsibility to enforce these restrictions as much as possible, what are my best options?</p>
  
  <p>edit: I have no experience using a CDN, but would be willing to use this if it's a viable option that covers these needs.</p>