fix: route images before binary detection

This commit is contained in:
HuanLinOTO
2026-08-10 16:54:13 +08:00
parent a6befc8b6b
commit eb5059574e
3 changed files with 27 additions and 5 deletions
+8
View File
@@ -0,0 +1,8 @@
/** Image extension dispatch, separate from React for unit testing. */
export const IMAGE_EXTENSIONS = [
'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg', '.bmp', '.ico', '.avif',
] as readonly string[]
export function isImageExt(ext: string): boolean {
return IMAGE_EXTENSIONS.includes(ext)
}