Added checks for non-generated images