title: Wordpress get image url (currently using wp_get_attachment_url)
body: <p>Having a little trouble in getting image attachment urls in wordpress. This is my code so far:</p>
  
  <pre><code>&lt;?php // find images attached to this post / page.
              global $post;
              $thumb_ID = get_post_thumbnail_id( $post-&gt;ID );
              $args = array(
                  'post_type' =&gt; 'attachment',
                  'post_mime_type' =&gt; 'image',
                  'numberposts' =&gt; -1,
                  'orderby' =&gt; 'menu_order',
                  'order' =&gt; 'ASC',
                  'exclude' =&gt; $thumb_ID,
                  'post_parent' =&gt; $post-&gt;ID
              );
              $images = get_posts($args);
              ?&gt;
  
              &lt;?php // Loop through the images and show them
  
              if($images)
              {
              foreach($images as $image)  
              {
  
              echo  wp_get_attachment_image_url($image-&gt;ID, $size='attached-image');
  
              }
              }
  
  ?&gt;
  </code></pre>
  
  <p>Which returns nothing. If I swap out <code>wp_get_attachment_image_url($image-&gt;ID, $size='attached-image');</code> for <code>wp_get_attachment_image($image-&gt;ID, $size='attached-image');</code> this works fine, but brings in the image rather than just the url.</p>