Fix graph image generation on production

The image generation was throwing javascript errors in production due to
cross origin ajax calls.