1

I'm using easy-thumbnails all over my site. It works fine generally. But now I'd want to create a product feed for Facebook and the pictures need to be 600x600px square.

It looks like this:

thumbnailer = get_thumbnailer(v.product.image)
thumbnail_options = {
  'crop': '50,0', #tried smart, scale and all kinds of combos
  'size': (600, 600)
}
resized_image = thumbnailer.get_thumbnail(thumbnail_options)

The problem is that I always end up getting one dimension to 600px, and the other to <600px. Can I make it do something like the smart option but cropping in a way that I get a square image?

Thank you in advance!

htomika
  • 41
  • 6

1 Answers1

1
thumbnailer = get_thumbnailer(v.product.image)
thumbnail_options = {
  'crop': 'smart',
  'upscale': True,
  'size': (600, 600)
}
resized_image = thumbnailer.get_thumbnail(thumbnail_options)
Lauri Elias
  • 1,231
  • 1
  • 21
  • 25