Update r script to use images and modify api subdomain