update the gallery index