Customizing the size of thumbnails

25 views
Skip to first unread message

bel

unread,
Dec 11, 2011, 7:08:48 PM12/11/11
to Satchmo developers
According to http://www.satchmoproject.com/docs/dev/product.html :

Picture: This is the image of your item that you upload to the web
server. The actual thumbnail size is set in your templates.

How do we accomplish this? I tried doing the following:

{% thumbnail product.main_image.picture 220x280 as image %}
<a href="{{ product.get_absolute_url }}"><img src="{{ image }}"
width="{{ image.width }}" height="{{ image.height }}" /></a>

This did not work. No image was displayed.

Chris Moffitt

unread,
Dec 11, 2011, 7:41:48 PM12/11/11
to satchmo-d...@googlegroups.com
Your approach looks right. A couple of questions:
- If you try to upload a picture and view it without modifying the templates, does it work?
- What error are you seeing? Is it a 404 error or something else?
- How did you install PIL?

-Chris


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


bel

unread,
Dec 12, 2011, 10:44:44 PM12/12/11
to Satchmo developers
Ah seemed like PIL did not have JPEG support. Installed libjpeg-devel
and reinstalled PIL and that did the trick.

Thank you Chris and sorry for the false alarm!

On Dec 11, 7:41 pm, Chris Moffitt <ch...@moffitts.net> wrote:
> Your approach looks right. A couple of questions:
> - If you try to upload a picture and view it without modifying the
> templates, does it work?
> - What error are you seeing? Is it a 404 error or something else?
> - How did you install PIL?
>
> -Chris
>
>
>
>
>
>
>

> On Sun, Dec 11, 2011 at 6:08 PM, bel <belm...@gmail.com> wrote:
> > According tohttp://www.satchmoproject.com/docs/dev/product.html:

Reply all
Reply to author
Forward
0 new messages