change gallery get image function