Check if image exists with given url using jquery
<p>I want to check if an image exists using jquery.</p>

<p>For example how do I check this image exists</p>

<pre><code>http://www.google.com/images/srpr/nav_logo14.png 
</code></pre>

<p>the check must give me a 200 or status ok</p>

<p>--------------edited-------------------</p>

<pre><code>var imgsrc = $(this).attr('src');
var imgcheck = imgsrc.width;


if (imgcheck==0) {
alert("You have a zero size image");
} else { //do rest of code }
</code></pre>

<p>Thanks
Jean</p>
