I recently did this, and also, just fixed a bug in my program this morning. The bug happened because the code I copied from did not gracefully handle cases of multiple images. (Alas, I'm really just gluing together things without a lot of "understanding" and so these kinds of problems are happening to me a lot!)
Maybe this will help:
var query = { // This is our MQL query
type: "/music/artist", // Find a band
name: bandName, // With the specified name
id: null, // Fetch the ID of the band to link to their Freebase page
album: [{ // We want to know about albums
"/common/topic/image" : [{ // the images list on the album
"id" : null, // each image has an ID
"optional" : true // don't require an image to return a result
}]
};
Once your query comes back, you should have a list of 0 or more images in the "/common/topic/image" field. Each image will have an ID. You can then pass that ID to Freebase's thumbnail API to generate a version of that image at any size you like:
http://www.freebase.com/view/guid/9202a8c04000641f8000000006cf560a
I'm not quite sure