Open litchfield opened 6 years ago
this should be merged its literally insane that the whole app crashes if it can't find an image or there is some error with it. It should default to False because it is a potential denial of service condition if someone uploads a dodgy image.
@budlight tell me about it! It's been 9 months. I'm wondering if anyone actually uses this thing for anything even half serious?
This misbehavior (which is inherited from Django's ImageField) was the reason for me to finally bite the bullet and write my own imagefield. The code to check images on upload isn't very hard to write, but it was a bit tricky.
Anyway, just putting this out there. Using django-versatileimagefield was a pleasure, but I moved to something different.
In a large production deployment, we found some image files were crashing PIL. We didn't like that, and neither did our users.
Pull request #124 adds a new setting, VERSATILEIMAGEFIELD_CRASH_ON_BAD, default True to match current behaviour, for backwards compatibility.
Set it to False, and it will (won't?) do what it says on the tin. Crises (plural) averted. It'll still raise a warning though, in case you're interested.