<?php
/**
 * When using this template part, these variables are required. Use the
 * `vo_get_template_part` function to pass them to the template part.
 *
 * @var int $count ACF counter, used to get the post meta of the correct block.
 */

$prefix   = "vo_page_builder_{$count}_";
$image_id = (int) get_post_meta(get_the_ID(), $prefix . 'image', true);
?>

<?php if (!empty($image_id)) : ?>
    <section class="block block--image" data-animated>
        <?php echo wp_get_attachment_image($image_id, 'vo-fullwidth'); ?>
    </section>
<?php endif; ?>
