functionality to regenerate all galleries