image naturalWidth return zero

Viewed 28655

image naturalWidth return zero... that's it, why ?

var newimage = new Image();
newimage.src = 'retouche-hr' + newlinkimage.substring(14,17) + '-a.jpg'; 
var width = newimage.naturalWidth;
alert (width);

HELP, i dont know why !

*** that path is good, the image show up !

3 Answers
Related