title: Simple Call to Get Category Images & Display in List
body: <p>I'm displaying a list of sub categories by parent category ID and am wanting to display the category image in place of a category name.</p>
  
  <p>Here is what I have so far...</p>
  
  <pre><code>&lt;div id="menu_brands"&gt;
  &lt;div class="brand_head"&gt;
      &lt;h3&gt;&lt;?php echo $this-&gt;__('Browse By Brand') ?&gt;&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="brand_list"&gt;
      &lt;?php
          $cats = Mage::getModel('catalog/category')-&gt;load(6)-&gt;getChildren();
          $catIds = explode(',',$cats);
  
          $categories = array();
              foreach($catIds as $catId) {
                  $category = Mage::getModel('catalog/category')-&gt;load($catId); 
                  $categories[$category-&gt;getName()] = $category-&gt;getUrl();
                  $img = $category-&gt;getImageUrl(); //I suspect this line is wrong
          }
  
          ksort($categories, SORT_STRING);
      ?&gt;
  
          &lt;ul&gt;
              &lt;?php foreach($categories as $name =&gt; $url): ?&gt;
                  &lt;li&gt;
                      &lt;!--&lt;a href="&lt;?php echo $url; ?&gt;"&gt;&lt;?php echo $name; ?&gt;&lt;/a&gt;--&gt;
                      &lt;a href="&lt;?php echo $url; ?&gt;" title="&lt;?php echo $name; ?&gt;"&gt;
                          &lt;img src="&lt;?php echo $img; ?&gt;" width="auto" alt="&lt;?php echo $name; ?&gt;" /&gt; &lt;!--I suspect this line is wrong--&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
              &lt;?php endforeach; ?&gt;
          &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried countless ways to display the images in place of the category names but nothing seems to make the images appear. Currently with the above, the output is an empty 'img src' so there is clearly an error with what I'm trying (and probably a better way of achieving what I'm after).</p>
  
  <p>Please could someone kindly point out what the problem is?</p>
  
  <p>If it's of any relevance, what I intend to do afterwards is then display the category images in a grid format (3 or 4 per line).</p>
  
  <p>Many thanks in advance.</p>