update gallery.