Skip to content

Commit 74f824b

Browse files
committed
Improved detection of JXL files
1 parent bd26aba commit 74f824b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SoftCreatR/MimeDetector/MimeDetector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,10 @@ public function getFileType(): array
877877
];
878878
}
879879

880-
if ($this->checkForBytes([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) {
880+
if (
881+
$this->checkForBytes([0xFF, 0x0A]) ||
882+
$this->checkForBytes([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A])
883+
) {
881884
return [
882885
'ext' => 'jxl',
883886
'mime' => 'image/jxl'

0 commit comments

Comments
 (0)