When passing in local image url API works great. When passing remote image url api does not provide any results. Here is my code for reference:
'use strict'
// Imports the Google Cloud client library
const Vision = require('@google-cloud/vision');
// Your Google Cloud Platform project ID
const projectId = 'my-id-is-here';
// Instantiates a client
const visionClient = Vision({
projectId: projectId,
keyFilename: 'service.json'
});
var img = 'https://d13yacurqjgara.cloudfront.net/users/995236/screenshots/3024565/day-36-normal.png';
var types = ['label','properties'];
visionClient.detect(img, types, function(err, detection, apiResponse) {
// console.log(detection['labels']);
// console.log(detection['properties']['colors']);
if (err) throw err
console.log(JSON.stringify(apiResponse, null, 2))
});
When passing in local image url API works great. When passing remote image url api does not provide any results. Here is my code for reference: