js check if image work code example
Example: javascript check if is image
function isFileImage(file) {
return file && file['type'].split('/')[0] === 'image';
}
function isFileImage(file) {
return file && file['type'].split('/')[0] === 'image';
}