Skip to content

Commit 221e237

Browse files
Merge pull request mdn#203 from apoorva-sriv/patch-2
Expand list of valid image types
2 parents 31b3ff0 + bfdb9d0 commit 221e237

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

html/forms/file-examples/file-example.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,18 @@
114114
}
115115
}
116116

117+
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types
117118
const fileTypes = [
118-
'image/jpeg',
119-
'image/pjpeg',
120-
'image/png'
119+
'image/apng',
120+
'image/bmp',
121+
'image/gif',
122+
'image/jpeg',
123+
'image/pjpeg',
124+
'image/png',
125+
'image/svg+xml',
126+
'image/tiff',
127+
'image/webp',
128+
`image/x-icon`
121129
];
122130

123131
function validFileType(file) {

0 commit comments

Comments
 (0)