I have an image gallery on a page, and I'm using advance custom fields to pull in a thumbnail and a larger version of that image. Right now, I have it set up as two separate fields so the user has to upload two separate images (a thumbnail and a full size). I'm attempting to set it up so the user only has to upload one image, but when I follow the example on http://www.advancedcustomfields.com/resources/field-types/image/, my thumbnails don't work, but the full image still does. Here's the code I've been working with:
<?php query_posts(array(
'post_type' => 'gallery_images',
'posts_per_page' => 20,
)); ?>
<?php while (have_posts()) : the_post(); $gallery_images;
$attachment_id = get_field('gallery_full');
$size = "thumbnail"; // (thumbnail, medium, large, full or custom size)
$image = wp_get_attachment_image_src( $attachment_id, $size );
?>
<div class="gallery_image_wrap"><a rel="shadowbox[galpage]" href="<?php the_field('gallery_full'); ?>"><img src="<?php echo $image[0]; ?>" /></a></div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
And this is an example of what it returns:
<div class="gallery_image_wrap">
<a href="http://example.com/photo.jpg" rel="shadowbox[galpage]">
<img src=" ">
</a>
</div>
What am I doing wrong? (Also, I tried uploading a new image to see if that was a solution, and I still encountered the same issue.)