Skip to content

Detect file by mime type - not filename extension #149

@T-3B

Description

@T-3B

Hello!
I wanted to know it would be possible for ECT to detect the file type from the mime type (file --mime-type), instead of relying on the filename extension ?

It is not uncommon to see a "file.png" which is actually a JPG (and vice versa). ECT will try to optimize it as a PNG, but fails and displays decoding error 28: incorrect PNG signature, it's no PNG or corrupted.
I would like to have a way to still optimize these files, which have an incorrect filename extension. Either by forcing ECT to use JPG optimizer --force-jpg, or (preferably) by having ECT detect file types from mime types.

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