New automated getImages function