I'm looking for how to detect an image data is truncated\corrupted. For example this picture:
the data image is not complete (It's more tangible on IE, and its noted as warning in firefox console), but img.onerror not fired, and img.completed is true.
demo: https://jsfiddle.net/7dd0ybb4/
var img = document.getElementById('MyPicture');
img.onerror = () => alert('error img');
img.onload = () => console.log(img.complete); //true
img.src = "https://i.stack.imgur.com/nGkok.jpg";
I want a way to know that. if an image have invalid data.