Q:

Retrieving a product picture via PHP Amazon Zend Service

I have installed the Amazon Zend library from GitHub and can access item information using the following:
    <?php
        require_once './Zend/Loader/StandardAutoloader.php';

        $autoloader = new Zend\Loader\StandardAutoloader(array(
            'namespaces' => array(
                'Zend'        => dirname(__FILE__) . '/Zend',
                'ZendRest'    => dirname(__FILE__) . '/ZendRest',
                'ZendService' => dirname(__FILE__) . '/ZendService',
             ),
             'fallback_autoloader' => true));

        $autoloader->register();

        $tag       = 'omitted';
        $appId     = 'omitted';
        $secretKey = 'omitted';

        $query = new ZendService\Amazon\Query($appId, 'UK', $secretKey);
        $query->Category('Electronics')->Keywords('nVidia')->AssociateTag($tag);
        $result = $query->search();
        foreach($result as $item)
        {
    ?>
            <div class="item">
              <a href="<?php echo $item->DetailPageURL ?>" target="_blank"><?php echo $item->Title ?></a>
            </div>
    <?php
        }
    ?>

which yields descriptive links to the products as expected.
I am trying to display each product's image alongside the link and am wondering if anyone has experience with doing this. When I print_r($item) I see this:
[SmallImage] => 
[MediumImage] => 
[LargeImage] => 

as well as all the other info (shortened for easier reading). It appears that these elements are empty but on the product links there are in fact picture(s) of the products. This happens for every product I search for. Is there an argument I need to set to return pictures?
There is also a class called ZendService\Amazon\Image which I am not sure how to use - the documentation is appaling. Would I need to call this to return an image? If so, how and where?

A:

The Amazon API does not include image data in the response by default. You can specify what information you want for each result using the ResponseGroup parameter. The docs include an example of this using the itemSearch syntax, I'm not entirely sure how you'd use this using the query method but hopefully this will point you in the right direction.

