use if
instead of while
because you want to compare if a field is exist or has some value, by using while
you are looping trough and this loop can’t stop until your php’s execution time limit is ended, try this.
<?php if (get_field('block_repeater')) { ?>
<ul>
<?php if (has_sub_field('block_repeater')) : ?>
<li>
<!-- problem -->
<?php $block_link = get_sub_field('block_link');
$block_image = get_sub_field('block_image');
if ($block_image) { ?>
<?php if ($block_link) { ?><a class="img" href="https://wordpress.stackexchange.com/questions/114395/<?php the_sub_field("block_link'); ?>"><?php } ?>
<img src="https://wordpress.stackexchange.com/questions/114395/<?php the_sub_field("block_image'); ?>" alt="" />
<span class="square-arrow"></span>
<?php if ($block_link) { ?></a><?php } ?>
<?php } ?>
</li>
<?php endif; ?>
</ul>