merging in changes from CORS in oprime-montage to do CORS on images