How can I get image locations in a list of entries using the Element API plugin? 'api/looks/list' =&gt; [
        'criteria' =&gt; ['section' =&gt; 'looks'],
        'transformer' =&gt; function(EntryModel $entry) {

                //print_r($entry-&gt;getAncestors());
                // $model = $entry-&gt;content-&gt;attributeConfigs["featuredImage"]["model"];
                // echo 'class type: ' . get_class($model);
                // print_r($model);

            return [
                'title' =&gt; $entry-&gt;title,
                'id' =&gt; $entry-&gt;id,
                'url' =&gt; $entry-&gt;url,
                'jsonUrl' =&gt; UrlHelper::getUrl("looks/{$entry-&gt;id}.json"),
                'kachelgroesse' =&gt; $entry-&gt;kachelgroesse,
                'category' =&gt; $entry-&gt;category,
                'image' =&gt; $entry-&gt;image
            ];
        },
    ],


This is my elementapi.php file and it returns:

{
  "data": [
    {
      "title": "SHINY AND RED LIPS",
      "id": "281",
      "url": "http://craft.dev:8888/looks/shiny-and-red-lips",
      "jsonUrl": "http://craft.dev:8888/looks/281.json",
      "kachelgroesse": {
        "0": {
          "label": "mittel",
          "value": "mittel",
          "selected": true
        }
      },
      "category": {
        "0": {
          "label": "Make-Up",
          "value": "Make-Up",
          "selected": true
        }
      },
      "image": {}
    }
  ],
}


There is no image returning.  I am requesting the list of all entries and their image/asset location from the API.
This should work for the images and you can easily adapt to do your categories &amp; kachelgroesse if needed (not tested)...

'api/looks/list' =&gt; [
    'elementType' =&gt; 'Entry',
    'criteria' =&gt; ['section' =&gt; 'looks'],
    'transformer' =&gt; function(EntryModel $entry) {
        $images = [];
        foreach ($entry-&gt;featuredImage as $image) {
        $images[] = $image-&gt;url;
        }
        return [
        'title' =&gt; $entry-&gt;title,
        'id' =&gt; $entry-&gt;id,
        'url' =&gt; $entry-&gt;url,
        'jsonUrl' =&gt; UrlHelper::getUrl("looks/{$entry-&gt;id}.json"),
        'kachelgroesse' =&gt; $entry-&gt;kachelgroesse,
        'category' =&gt; $entry-&gt;category,
        'image' =&gt; $images
        ];
    },
],