Support

Account

Home Forums Add-ons Repeater Field Repeater / Image Size Issue Reply To: Repeater / Image Size Issue

  • I ended up using this code that works great:

    
    $attachment_id = get_sub_field('gallery_image');
    $size_thumb = "gallery-img"; // (thumbnail, medium, large, full or custom size)
    $size_gallery = "full"; // (thumbnail, medium, large, full or custom size)
    	 
    $image_thumb = wp_get_attachment_image_src( $attachment_id, $size_thumb );
    $image_gallery = wp_get_attachment_image_src( $attachment_id, $size_gallery );
    	// url = $image[0];
    	// width = $image[1];
    	// height = $image[2]; ?>
    	
    <div class="gallery-img">	
     <img alt="Dance Avenue" src="<?php echo $image_thumb[0]; ?>" />
      <div class="enlarge-img">
       <?php
        echo '<a class="fancybox" rel="group-'.get_the_ID().'" href="';
        echo $image_gallery[0];
        echo '">View Images</a>';
       ?>
    </div>