I am having trouble geting artist images in the Spotify Apps API. The image property of the Artist object is mostly returning as null or undefined. This is the case whether I get the artist directly from a collection of artists (such as from sp.core.library.getArtists()) or if I use Artist.fromURI and use a callback function.
Here is an example of the sort of thing I am doing:
var m = sp.require('sp://import/scripts/api/models');
var a = m.Artist.fromURI(uri, function(artist) {
console.log(artist.name + " " + artist.image);
});
Looking in the console I see the artist name, but a null or undefined image.
Sometimes if I start Spotify and go to the artists page before starting my app, the image will be populated but later it will become null again.
Am I missing anything, or could this be a bug in the API?