fix gallery space name in image id