Select these:
<img src="...">
but not:
<img />
var imgFile = $("img").attr("src");
See http://docs.jquery.com/Selectors
$("img[src]")