title: Wordpress echo src for category image
body: <p>I have added the ability to add featured images to post categories using a plugin called WP Custom Categories. I am trying to display a list of categories from a custom post type on a page but instead of displaying the title, I want to show the image.</p>
  
  <p>To do this I have created a custom walker class for the Walker_Category which is changing the output of wp_list_categories.</p>
  
  <p>My custom walker class looks like this in functions.php:</p>
  
  <pre><code>class WPQuestions_Walker extends Walker_Category {
  
  function start_lvl(&amp;$output, $depth=1, $args=array()) {  
      $output .= "\n&lt;ul class=\"product_cats\"&gt;\n";  
  }  
  
  function end_lvl(&amp;$output, $depth=0, $args=array()) {  
      $output .= "&lt;/ul&gt;\n";  
  }  
  
  function start_el(&amp;$output, $item, $depth=0, $args=array()) {
      // Category image
      if ( is_category() &amp;&amp; function_exists('category_image_src')) {
  $category_image = category_image_src( array( 'size' =&gt; 'full' ) , false );
  } else {
  $category_image = '';
  } 
  
      //$output .= "&lt;li class=\"item\"&gt;".esc_attr( $item-&gt;name );
      $output .= "&lt;div class=\"col-md-4 entry project\"&gt;";
      $output .= "&lt;img class=\"project_cat_image\" src=\"";
      $output .= $category_image;
      $output .= "\"/&gt;";
  }  
  
  function end_el(&amp;$output, $item, $depth=0, $args=array()) {  
      //$output .= "&lt;/li&gt;\n";
      $output .= "&lt;/div&gt;";
  }      
  
  }
  </code></pre>
  
  <p>You will see the snippet of code I am using to try and grab the image is as follows:</p>
  
  <pre><code>// Category image
      if ( is_category() &amp;&amp; function_exists('category_image_src')) {
  $category_image = category_image_src( array( 'size' =&gt; 'full' ) , false );
  } else {
  $category_image = '';
  }
  </code></pre>
  
  <p>However, no URL is being outputted in my html. What am I doing wrong here? Is there a better way to try and grab this image? </p>