Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 7be14bd

Browse files
authored
feat(assets): add image file type jxl format to check
1 parent 9be1e05 commit 7be14bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/rpc/assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { AssetInfo, AssetType, ImageMeta } from '../../types'
99
const _imageMetaCache = new Map<string, ImageMeta | undefined>()
1010

1111
function guessType(path: string): AssetType {
12-
if (/\.(a?png|jpe?g|gif|svg|webp|avif|ico|bmp|tiff?)$/i.test(path))
12+
if (/\.(a?png|jpe?g|jxl|gif|svg|webp|avif|ico|bmp|tiff?)$/i.test(path))
1313
return 'image'
1414
if (/\.(mp4|webm|ogv|mov|avi|flv|wmv|mpg|mpeg|mkv|3gp|3g2|ts|mts|m2ts|vob|ogm|ogx|rm|rmvb|asf|amv|divx|m4v|svi|viv|f4v|f4p|f4a|f4b)$/i.test(path))
1515
return 'video'

0 commit comments

Comments
 (0)