Repository: image-rs/image (language: rust)

Issue:
JFIF etension is not recognized
The `.jfif` extension is the one that [should normally be used for JPEG files](https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format), even though everyone uses `.jpg` or `.jpeg` (JPEG is the format, JFIF is the container).

Unfortunately the `image` crate does not recognize this extension and returns an error. Would it be possible to add support for it?

Thanks :)


Discussion / hints:

Fix patch:
diff --git a/src/image.rs b/src/image.rs
index e2bddf3a29..131e95707c 100644
--- a/src/image.rs
+++ b/src/image.rs
@@ -90,7 +90,7 @@ impl ImageFormat {
 
             Some(match ext.as_str() {
                 "avif" => ImageFormat::Avif,
-                "jpg" | "jpeg" => ImageFormat::Jpeg,
+                "jpg" | "jpeg" | "jfif" => ImageFormat::Jpeg,
                 "png" | "apng" => ImageFormat::Png,
                 "gif" => ImageFormat::Gif,
                 "webp" => ImageFormat::WebP,


Test patch: