Skip to content

PIL.UnidentifiedImageError: cannot identify image file #22

Closed
@mmagdy88

Description

@mmagdy88

Hello,

This issue is similar to #13

I try to use optimize-images cli on Ubuntu to recursively optimize images, it happens suddenly that I get this error:

PIL.UnidentifiedImageError: cannot identify image file

when I try to only optimize the image in question I get the same error, so the error is in the image itself, when I check its type and details I get that:
JPEG image data, JFIF standard 1.01, resolution (DPI), density 96x96, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=23, height=0, bps=0, compression=LZW, PhotometricIntepretation=RGB, manufacturer=Canon, model=Canon EOS 5DS R, orientation=upper-left, width=0]

# python -V
Python 3.6.10
# optimize-images -v
1.3.5
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"

My question here, why the software refusing to optimize this image and how can I make it ignore and continue because if it finds an error it just stops, I want it to ignore that error and continue working on the rest.

Best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions