sorl/sorl-thumbnail — Issue #90: Access denied when using the thumbnail templatetag
Author: dellis23
Created: 2012-03-07 19:24:43+00:00
State: open

I've searched for other solutions to this problem to no avail. I'm not passing the templatetag a string; I am passing the actual image object. This is what my template looks like:

{% thumbnail request.user.get_profile.image "75x75" crop="center" as im %}

{% endthumbnail %}

And this is the error I get:

TemplateSyntaxError at /page/
Caught SuspiciousOperation while rendering: Attempted access to '/uploads/profile_images/image.gif' denied.

I suspect this is because the path it should be accessing is the full path on the drive itself. I have media and static settings as such:

MEDIA_ROOT = '/home/user/Documents/new_site/django_proj/media/'
MEDIA_URL = '/uploads/'
STATIC_ROOT = '/home/user/Documents/new_site/django_proj/static/'
STATIC_URL = '/static/'

Names have been changed slightly to protect anonymity.

Thanks in advance for any help you can offer.