Example shows creating random background image for header.
<?php //must select ImageID as Return Value $rows = get_field('title_images' ); // get all the rows $rand_row = array_rand($rows, 1); // get a random row $rand_row_image = $rand_row['img_title']; // get the sub field value $titleimage = wp_get_attachment_image_src( $rand_row_image, 'full' ); // url = $image[0]; // width = $image[1]; // height = $image[2]; ?>
Reference Links
https://support.advancedcustomfields.com/forums/topic/random-image-repeater/