update gallery index