<?php
if(get_field('gallery')){
    $home_gallery = get_field('gallery');
    ?>
    <div class="container-fluid gallery">
        <div class="row">
            <?php
            foreach ($home_gallery as $img){
                ?>
                <div class="col-12 col-sm-6 col-md-6 col-lg-3 p-0">
                    <img loading="lazy" src="<?php echo $img['img']['sizes']['c_medium'];?>" alt="<?php echo $img['img']['alt'];?>" class="img-fluid">
                </div>
                <?php
            }
            ?>
        </div>
    </div>
<?php } ?>