3 added 17 characters in body; edited tags
source | link

When I use wp_get_attachment_image_src()wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. TheThe only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`
$photos = get_post_custom( $photo_id );
for ($i=0; $i = 0; $i <= 12; $i++ ) { 
   if ( isset($photos['photo' $photos[ 'photo'.$i][0]$i ][0] ) ) {
        $image_attributes = $alt = '';
        $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0],  'medium' );
        $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'$photos[ 'photo'.$i][0]$i ][0].' lightbox-img" /></a>';
    }
 }`

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`
$photos = get_post_custom($photo_id);
for ($i=0; $i <= 12; $i++) { 
  if (isset($photos['photo'.$i][0])) {
    $image_attributes = $alt = '';
    $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0], 'medium');
    $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'.$i][0].' lightbox-img" /></a>';
  }
 }`

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

$photos = get_post_custom( $photo_id );
for ( $i = 0; $i <= 12; $i++ ) { 
   if ( isset( $photos[ 'photo'.$i ][0] ) ) {
        $image_attributes = $alt = '';
        $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0],  'medium' );
        $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos[ 'photo'.$i ][0].' lightbox-img" /></a>';
    }
}
2 Added $photos info to code
source | link

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`for`
$photos = get_post_custom($photo_id);
for ($i=0; $i <= 12; $i++) { 
  if (isset($photos['photo'.$i][0])) {
    $image_attributes = $alt = '';
    $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0], 'medium');
    $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'.$i][0].' lightbox-img" /></a>';
  }
 }`

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`for ($i=0; $i <= 12; $i++) { 
  if (isset($photos['photo'.$i][0])) {
    $image_attributes = $alt = '';
    $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0], 'medium');
    $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'.$i][0].' lightbox-img" /></a>';
  }
 }`

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`
$photos = get_post_custom($photo_id);
for ($i=0; $i <= 12; $i++) { 
  if (isset($photos['photo'.$i][0])) {
    $image_attributes = $alt = '';
    $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0], 'medium');
    $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'.$i][0].' lightbox-img" /></a>';
  }
 }`
1
source | link

wp_get_attachment_image_src

When I use wp_get_attachment_image_src(), the medium sized image is returned on 3 out of 6 of my images. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded.

Here's my code:

`for ($i=0; $i <= 12; $i++) { 
  if (isset($photos['photo'.$i][0])) {
    $image_attributes = $alt = '';
    $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0], 'medium');
    $photo .= '<a href="'.wp_get_attachment_url( $photos['photo'.$i][0]).'" rel="lightbox-'.$i.'"><img src="'.$image_attributes[0].'" class="aligncenter size-full wp-image-'.$photos['photo'.$i][0].' lightbox-img" /></a>';
  }
 }`