bartulans
7/12/2016 - 8:18 AM

From https://wordpress.org/support/topic/create-lightbox-for-acf-image

<?php
$images = get_field( 'gallery' );

if( $images ): ?>

	<?php foreach( $images as $image ): ?>

	<?php $image_large = wp_get_attachment_image_src($image['id'], 'large'); ?>
        <?php $image_thb = wp_get_attachment_image_src($image['id'], 'thumbnail'); ?>
        <a href="<?php echo $image_large[0]; ?>" rel="lightbox[gallery]">
            <img src="<?php echo $image_thb[0]; ?>" class="attachment-thumbnail" />
        </a>

	<?php endforeach; ?>

<?php endif; ?>