fix gallery to work with rest image service