1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-17 03:47:45 +02:00

feat: JPEG XL (#2893)

Support the JPEG XL format (.jxl).

JPEG XL is reported as supported by `sharp.format`:

```
jxl: {
  id: 'jxl',
  input: { file: true, buffer: true, stream: true, fileSuffix: [Array] },
  output: { file: true, buffer: true, stream: true }
}
```

Fixes: #2743
This commit is contained in:
Thomas
2023-06-21 13:29:02 +01:00
committed by GitHub
parent 868f629f32
commit 80d02e8a8d
7 changed files with 174 additions and 56 deletions

View File

@ -22,8 +22,46 @@ export const openFileUploadDialog = async (
// When adding a content type that is unsupported by browsers, make sure
// to also add it to getFileMimeType() otherwise the upload will fail.
fileSelector.accept =
'image/*,video/*,.heic,.heif,.avif,.dng,.3gp,.nef,.srw,.crw,.cr2,.cr3,.raf,.insp,.insv,.arw,.erf,.raf,.dcr,.k25,.kdc,.mrw,.orf,.raw,.pef,.x3f,.srf,.sr2,.3fr,.fff,.rwl,.ori,.iiq,.ari,.cap,.cin,.mov';
fileSelector.accept = [
'image/*',
'video/*',
'.3fr',
'.3gp',
'.ari',
'.arw',
'.avif',
'.cap',
'.cin',
'.cr2',
'.cr3',
'.crw',
'.dcr',
'.dng',
'.erf',
'.fff',
'.heic',
'.heif',
'.iiq',
'.insp',
'.insv',
'.jxl',
'.k25',
'.kdc',
'.mov',
'.mrw',
'.nef',
'.orf',
'.ori',
'.pef',
'.raf',
'.raf',
'.raw',
'.rwl',
'.sr2',
'.srf',
'.srw',
'.x3f'
].join(',');
fileSelector.onchange = async (e: Event) => {
const target = e.target as HTMLInputElement;