Forgot to paste this:
<?php
$args = array (
'post_type' => 'post',
'posts_per_page' => -1,
'meta_key' => 'project',
'orderby' => 'rand',
'meta_compare' => 'EXISTS' );
$query = new WP_Query($args);
while ($query->have_posts()): $query->the_post();
if (have_rows('project')) {
while(have_rows('project')) {
the_row();
?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_sub_field('image'); ?>"></a>
<?php
}
}
endwhile;
wp_reset_query();
?>