0

I installed sorl-thumbnail and a lot seems to go right. For every {% thumbnail %} tag some folders and a thumbnail image are created in a "cache" folder.

Inside the template the image url is rendered as something like "cache/7b/74/7b74e7338fd08c52e3ac7526aa5eb7b6.jpg", which seems correct as well. However no image is displayed. When I try following the cache link, it results in a 404 error.

Roy Prins
  • 2,790
  • 2
  • 28
  • 47
  • On the rendered page, does the link starts like `cache/7b/74...` or is it `/media/cache/7b/74` ?... if it's like the first one, then c&p the link and prepend '/media/' to it. If the image shows, then, the problem is the generated url. Can you post the part where you're generating the thumbnail? – andzep Dec 01 '14 at 00:34
  • Also, if your problem is the missing `/media/`, take a look at this other question: http://stackoverflow.com/questions/6187465/sorl-thumbnail-bad-urls – andzep Dec 01 '14 at 00:41
  • @andzep Yes, I did not have the /media/ links set up, so I fixed it now. It works ok, thx. Can you resubmit your comment as an answer, so I can accept it? – Roy Prins Dec 01 '14 at 07:14

1 Answers1

1

On the rendered page, does the link starts like cache/7b/74... or is it /media/cache/7b/74 ?... if it's like the first one, then c&p the link and prepend /media/ to it. If the image shows, then the problem is the generated url.

Also, if your problem is the missing /media/, take a look at this other question: Sorl-thumbnail bad url's

Community
  • 1
  • 1
andzep
  • 1,877
  • 24
  • 35