i was trying to get an image back from the api call, but it doesnt return an image, instead i receive a link to an html with the image i have requested. How can i get only the image? Here's the code, the "foto" parameter is the photo_reference i obtain with the google place id api call
async function getFoto(foto){
const api_key="mykey"
try {
let response = await axios.get("https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference="+foto+"&key="+api_key)
console.log("https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference="+foto+"&key="+api_key)
return Promise.resolve(response)
}catch(error) {
console.log(error)
return Promise.reject
}
}