The MEDIA_ROOT is set up correctly: MEDIA_ROOT = '/home/myusername/
myprojectname/uploads/'
And the images are stored here: /uploads/files/img/foldername/file.jpg
The relative path, /uploads/files/img/wahanda/name.jpg works..but not
like this:
{% thumbnail result.object.image_path  "50x50" crop="80% top" as im %}
  <img src="{{ im.url }}">
{% endthumbnail %}



On May 24, 5:20 pm, krzysiekpl <krzysie...@gmail.com> wrote:
> Did you correctly set up MEDIA_ROOT in settings ?Sorl-thumbnailonly
> use files from MEDIA_ROOT try to move uploads/ to media a then use
> realtive path to file.
>
> On 24 Maj, 06:40, Oana Salageanu <oana.salage...@adulmec.ro> wrote:
>
>
>
>
>
>
>
> > I'mnotsure what I'm doing wrong, this is my template code:
> > {% load thumbnail %}
>
> > {% thumbnail result.object.image_path|make_thumb  "50x50" crop="80%
> > top" as im %}
> > <img src="{{ im.url }}">
> > {% endthumbnail %}
>
> > where result.object.image_path|make_thumb, it's something like 
> > this:http://93.XXX.XX.XXX:8000/uploads/files/img/wahanda/name.jpg
>
> > I also tried this:
>
> > {% thumbnail result.object.image_path  "50x50" crop="80% top" as im %}
> > <img src="{{ im.url }}">
> > {% endthumbnail %}
>
> > where result.object.image_path is /uploads/files/img/wahanda/name.jpg
> > If I copy the path and put it in my browser, it works, so the path is
> > ok.
>
> > Also, this works:
> > {% thumbnail "http://www.aino.se/media/i/logo.png"; "50x50" crop="80%
> > top" as im %}
> >   <img src="{{ im.url }}">
> > {% endthumbnail %}
>
> > Any ideas on what i'm doing wrong?
> > I can't use ImageField in my model since I only store the path.
>
> > Any suggestion will be super appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to