diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py index 577951961..046e13947 100644 --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -713,7 +713,7 @@ def jpeg_factory(fp=None, filename=None): # It's actually an MPO from .MpoImagePlugin import MpoImageFile im = MpoImageFile(fp, filename) - except (TypeError, IndexError): + except (TypeError, IndexError, ValueError): # It is really a JPEG pass except SyntaxError: