In your first code, add break;
after 'img' tag like this:
<?php if (get_field('studio_project_dia')) : while(has_sub_field('studio_project_dia')): ?>
<img src="<?php echo get_sub_field('studio_project_dia_img', $post->ID); ?>" />
<?php break; endwhile; endif; ?>
With break
, the while
loop will stop.