image validity test, iterator for all images