JavaScript Compruebe si es imagen
function isFileImage(file) {
return file && file['type'].split('/')[0] === 'image';
}
Troubled Turkey
function isFileImage(file) {
return file && file['type'].split('/')[0] === 'image';
}
if (img.getAttribute('src') === 'on.png')