title: Sorl-thumbnail bad url's
body: <p>I setup sorl-thumbnail according to instructions, but none of the images are appearing when I try to use the templatetags in my app.</p>
  
  <p>It appears that the url's are not valid, but it's not clear what additional configuration is needed.</p>
  
  <p>A image like like this is generated:</p>
  
  <pre><code>&lt;img src="cache/e5/25/e5253a328b9130ecd7d820893f44b0e6.jpg" width="100" height="100"&gt;
  </code></pre>
  
  <p>How does "cache/..." get resolved to a request for an image?  These requests are relative to my application, not to sorl-thumbnail:</p>
  
  <pre><code>[31/May/2011 07:13:05] "GET /myapp/cache/e5/25/cache/e5/25/cache/00/73/0073095ee4b968b45386ef3fec4f389c.jpg HTTP/1.1" 200 1004
  </code></pre>
  
  <p>Here are the relevant lines in settings.py:</p>
  
  <pre><code>INSTALLED_APPS = (
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.sites',
      'django.contrib.messages',
      # Uncomment the next line to enable the  admin:                                          
      'django.contrib.admin',
      'mysite.myapp',
      'sorl.thumbnail',
  )
  
  CACHES = {
  #    'default': {                                                                           
  #        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',                          
  #        'LOCATION': 'cache',                                                               
  #    }                                                                                    
      'default': {
          'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
          'LOCATION': '127.0.0.1:11211',
      }
  }
  
  # URL that handles the media served from MEDIA_ROOT. Make sure to use a                     
  # trailing slash if there is a path component (optional in other cases).                    
  # Examples: "http://media.lawrence.com", "http://example.com/media/"                        
  MEDIA_URL = ''
  
  # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use   a              
  # trailing slash.                                                                           
  # Examples: "http://foo.com/media/", "/media/".                                             
  ADMIN_MEDIA_PREFIX = '/media/'
  </code></pre>
  
  <p>This is the code in my template:</p>
  
  <pre><code>{% thumbnail auction.item.image "100x100" crop="center" as im %}
      &lt;img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"&gt;
  {% endthumbnail %}
  </code></pre>
  
  <p>The image is definitely getting uploaded (I checked the directory specified in upload_to), and when I was using the filesystem cache they were getting stored in the directory cache/ relative to my app.  I changed it to use memcache to see if that would help.</p>