easy-thumbnails icon indicating copy to clipboard operation
easy-thumbnails copied to clipboard

Fallback for InvalidImageFormatError

Open Luc45 opened this issue 7 years ago • 3 comments

If something goes wrong when trying to generate a thumbnail, like permissions, wrong format, anything, it takes the entire site down with a 500 internal error message.

The culprit is files.py, line 348:

        if image is None:
            raise exceptions.InvalidImageFormatError(
                "The source file does not appear to be an image")

It would be nice to be able to specify a fallback image on that point, to avoid error 500.

Luc45 avatar Aug 14 '17 16:08 Luc45

I got the same error recently. When you delete an image behind a filer-image you will get this exception. The culprit is files.py, line 348 => meanwhile it is line 388.

wfehr avatar Sep 27 '18 08:09 wfehr

I know this is very old, any workaround?

khrizo avatar Apr 25 '23 22:04 khrizo

I see the problem. Yes such a feature makes really sense.

jrief avatar Apr 27 '23 07:04 jrief