md: fix image handling
This commit is contained in:
1 parent
bcc3c48f27
commit
fe7898fa3c
4 files changed
+22
-12
No files matched your search
+2
-2
@@ -2,7 +2,7 @@ export const isImage = (url: string | undefined) => {
|
||||
try {
|
||||
if (!url) return false
|
||||
|
||||
return /\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i.test(url)
|
||||
return /\.(jpeg|jpg|gif|png|svg|bmp|webp|avif)/i.test(url)
|
||||
} catch (err) {
|
||||
return false
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export const isVideo = (url: string | undefined) => {
|
||||
try {
|
||||
if (!url) return false
|
||||
|
||||
return /\.(mp4|mov|webm|mkv)$/i.test(url)
|
||||
return /\.(mp4|mov|webm|mkv|avi)/i.test(url)
|
||||
} catch (err) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user