Added imgList variable in buildGallery