0

I am utilizing Imagekit to resize some images and export 3 different variations in a JSON format for an api call:

'image': k.thumbnail_large.url if k.image else '',                                                                                                                                   
'thumb_med': k.thumbnail_medium.url if k.image else '',
'icon': k.thumbnail_icon.url if k.image else '',

Problem is that on my non-beefy virtualized server of 512mb of RAM, I am crashing the Django application server when it tries to resize over 50 images * 3.

How do I go about priming/preprocessing these with over 500 images now entered into the CMS?

Brandon Lorenz
  • 211
  • 2
  • 13
  • "Crashing" how? Do you have details like a stack trace? – Ned Batchelder Jun 25 '12 at 00:28
  • No stack trace. It would just consume all the resources. I resolved the issue though: I changed it from `ImageSpec` to `ProcessedImageField(null=True,editable=False,blank=True)`. I also modified the `save()` of the model to: `self.thumbnail_medium.save(os.path.basename(self.image.name), self.image, save=False)` and the same for the large and icon, respectfully. – Brandon Lorenz Jun 25 '12 at 01:44

0 Answers0