Need good image on the fly resizing

157 views
Skip to first unread message

frocco

unread,
Apr 21, 2013, 8:35:02 PM4/21/13
to django...@googlegroups.com
Can someone point me to a good package?

Thanks

yati sagade

unread,
Apr 22, 2013, 1:59:47 AM4/22/13
to django...@googlegroups.com


On Mon, Apr 22, 2013 at 6:05 AM, frocco <far...@gmail.com> wrote:
Can someone point me to a good package?

Thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

Avraham Serour

unread,
Apr 22, 2013, 4:55:16 AM4/22/13
to django...@googlegroups.com
You should use Pillow instead of PIL

Aljoša Mohorović

unread,
Apr 22, 2013, 9:05:22 AM4/22/13
to django...@googlegroups.com

Richard Jelte

unread,
Apr 22, 2013, 11:39:19 AM4/22/13
to django...@googlegroups.com
If you don't want to have to handle manually resizing images, I would recommend letting something like sorl-thumbnail handle the re-sizing for you.  You will still need to have PIL or Pillow installed first, and make sure that png/jpeg support is available (This sometimes takes some tinkering.).

frocco

unread,
Apr 22, 2013, 2:33:22 PM4/22/13
to django...@googlegroups.com
I tried sorl-thumbnail and user is complaining that some images are not resized to same size as others.

frocco

unread,
Apr 22, 2013, 2:47:46 PM4/22/13
to django...@googlegroups.com
I also just realized that I am not using memcached

I will try this tonight and see if it helps.

frocco

unread,
Apr 23, 2013, 6:09:36 AM4/23/13
to django...@googlegroups.com
Memcached did not help with the resize problem of one image. I am using sorl-thumbnail. The other images look fine and uniform.

Kelly Nicholes

unread,
Apr 23, 2013, 10:45:52 AM4/23/13
to django...@googlegroups.com
For the problem with sorl-thumbnail not resizing to the same size as the others--  Are you cropping the image at all or just resizing?  If you crop, I don't understand how the images wouldn't be all the same size.  When I've used sorl, if the image is bigger than the dimensions to which I'm cropping/resizing, it's always spot-on.


On Sunday, April 21, 2013 6:35:02 PM UTC-6, frocco wrote:

frocco

unread,
Apr 23, 2013, 11:13:05 AM4/23/13
to django...@googlegroups.com
I am not cropping, just re-sizing.

I just made the mistake of clearing  their keystore and now no images display.Is there a way to rebuild the database?

I also have tried easy-thumbnails and see no images.

THUMBNAIL_ALIASES = {
    '': {
        'tires': {'size': (150, 150), 'crop': True},
        'brands': {'size': (164, 56), 'crop': True},
    },
}

<img src='{{ p.category.image_path|thumbnail_url:'brands' }}' alt="" />

Richard Jelte

unread,
Apr 23, 2013, 12:35:48 PM4/23/13
to django...@googlegroups.com

I am not cropping, just re-sizing.
 
 Like Kelly said, you'll have to make sure that all of the images are cropped the same way.

I just made the mistake of clearing  their keystore and now no images display.Is there a way to rebuild the database?

If you've used django's 'dumpdata' command to save the state of the database in a JSON file, you can use 'loaddata' to rebuild everything.  Otherwise, you need to re-enter the data the same way it was done initially.

frocco

unread,
Apr 23, 2013, 1:58:46 PM4/23/13
to django...@googlegroups.com
What about the cache directory?
Should I clear this also?

Thanks for the help.
Reply all
Reply to author
Forward
0 new messages