respondcreate / django-versatileimagefield

A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for quickly creating new images from the one assigned to the field.
http://django-versatileimagefield.readthedocs.io/
MIT License
530 stars 90 forks source link

Configurable exception handling #206

Open hovi opened 3 months ago

hovi commented 3 months ago

If I try to run filters in templates (ex image.crop.300x300) using django tests with test client, I get an error if the image file is missing. That is fine, but it complicates things for some types of automated tests we have. At some point we create fixtures based on our database and test if all pages are working. Some pages are crashing because image is physically missing for the test (which is correct), but it would be the easiest for this particular test to have silent failure.

Any chance this could get added as a configuration option? Happy to create PR if so.

oliverhaas commented 3 weeks ago

Would love to see that! We're currently working around that behavior as well.

If you start a PR, I will at least chime in, but I might have a go at it in the next month anyway.