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.
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.