Downloading thumbnails and replacing them with full images

12 views
Skip to first unread message

Larry Martell

unread,
Jan 23, 2015, 11:20:37 AM1/23/15
to django...@googlegroups.com
I have a django app that downloads 100's of images. To increase the
performance, I want to change it so that it downloads thumbnails, and
when the user clicks on one then download the full image.

I'm sure I can come up with something on my own (send an ajax request
on click, etc.) but I was wondering if anyone has already done
something like this and knew of any packages or can give any hints or
advice.

Thanks!
-larry

Russell Keith-Magee

unread,
Jan 23, 2015, 7:45:45 PM1/23/15
to Django Users
My suggestion - look into easy-thumbnails:


It's an augmentation of Django's ImageField that allows you to store a "single" image in your model, but also specify policies for how thumbnails of any image will be generated (in multiple sizes, if needed). The field will then automatically generate those thumbnails (either on upload, on demand on download, or in a background process, depending on how you configure it), and provide an easy way to find the media URL for each thumbnail (as well as the original).

Yours,
Russ Magee %-)



 

Larry Martell

unread,
Jan 24, 2015, 11:26:04 AM1/24/15
to django...@googlegroups.com
Thanks very much for the reply Russell. Before I got your message I
found SuperBox which seems to be working for me. But I will keep
easy-thumbnails in mind for the future.

-larry

Fred Stluka

unread,
Jan 24, 2015, 7:25:47 PM1/24/15
to django...@googlegroups.com
+1 for easy-thumbnails.  We use it and it works great.  Allows
the user to upload images, optionally crop them during the
upload, manages the full-size and thumbnail files on the file
system with their names in the DB, etc.  All automatic and all
easy.

--Fred
Fred Stluka -- mailto:fr...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
Reply all
Reply to author
Forward
0 new messages