I ended up patching the file pil_engine.py
in /lib/python2.7/site-packages/sorl/thumbnail/engines
:
--- pil_engine.py 2013-09-09 03:58:27.000000000 +0000
+++ pil_engine_new.py 2013-11-05 21:19:15.053034383 +0000
@@ -79,6 +79,7 @@
image.save(buf, **params)
except IOError:
params.pop('optimize')
+ ImageFile.MAXBLOCK = image.size[0] * image.size[1]
image.save(buf, **params)
raw_data = buf.getvalue()
buf.close()
This fixed the issue for me.