Frameright / php-image-metadata-parser

PHP image metadata parsing library (XMP, IPTC, Exif)
https://docs.frameright.io/php
MIT License
9 stars 1 forks source link

Improve file format detection #5

Open lourot opened 1 year ago

lourot commented 1 year ago

For now the library detects the format of a file (JPEG, PNG, ...) based on its extension. What if a file has no extension? The file could even have the wrong extension, for example some CDNs cache and deliver in the WebP format files that are originally JPEG or PNG.

The library should detect the format of a file by looking at its content instead.