added image loop code for listings page