>
> Keep in mind that routes.py doesn't enter the picture for anything being
> served directly by the host server (I see you're using nginx).
>
> Aside from figuring out how to serve the images directly, I see a couple of
> other problems. Here's the header from one of the dogs:
>
> HTTP/1.1 200 OK
> Server: nginx
> Date: Tue, 23 Nov 2010 01:13:44 GMT
> Content-Type: image/jpeg
> Connection: keep-alive
> Set-Cookie:
> session_id_init=174-144-113-160-a877555e-5e01-4be1-ab2e-21a592878bb9; Path=/
> Expires: Tue, 23 Nov 2010 01:13:44 GMT
> Pragma: no-cache
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
> Content-Length: 38773
>
> Notice the no-cache pragma: that doesn't make any sense, unless you're
> setting no-cache just for debugging.
>

This website is based on e-store appliance, and I did not change anything on
headers, no-cache is not being set on application (I made a search on this).



> Also, the image for Gabby (this is the headers we're looking at) is served
> as 480x393, and 38KB. But you're displaying it as 160x122. So you're sending
> 10 times as many pixels as you're going to display.


Yes, this is a problem and I have a solution now, I will use PIL to create
small thumbs (just have to figure out how to process every image on
/uploads, create the thumb and insert this path do db)


> You really want to shrink your images on the server, and not at the
> browser.

(Also, fwiw, your width shrink isn't proportional here, which is a minor
> problem.)
>
>
Thank you for the help.

BTW: Do you know how can I see if the image is served by apache/nginx or by
web2py function?



-- 

Bruno Rocha
http://about.me/rochacbruno/bio

Reply via email to