title: Get Wordpress Image URL not working
body: <p>I am using the following to get data on Wordpress Woocommerce products. I output the product data in json.</p>
  
  <pre><code> &lt;?php
   $args = array( 'post_type' =&gt; 'product', 'posts_per_page' =&gt; 200, 'product_cat' =&gt; 'clothes');
         $loop = new WP_Query( $args );
  
  
      $send_array = array();
         while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); 
          global $product; 
  
      $send_array[] = array(
  
          'id' =&gt; get_the_ID(),
          'title' =&gt; get_the_title(),
          'content' =&gt; get_the_content(),
          'regular_price' =&gt; get_post_meta( get_the_ID(), '_regular_price', true),
          'image' =&gt;wp_get_attachment_image_src(),
          'sale_price'=&gt; get_post_meta( get_the_ID(), '_sale_price', true)
      );
  
       endwhile; 
  
       wp_reset_query(); 
          ob_clean();
          echo json_encode($send_array);
          exit();
  
      ?&gt;
  </code></pre>
  
  <p>This code works fine and outputs the data correctly. However the <code>image</code> doesn't seem to work.</p>
  
  <p>I want to get the image url for each product. In the code above I tried <code>wp_get_attachment_image_src()</code>, but no luck.</p>
  
  <p>How do I use the code above to get the image url for each product and place it as the value to the <code>image</code> key in the array.</p>