带有图像的ACF中继器,仅显示一些自定义CSS的前3个图像

I have a custom image field in my website about page its like a small gallery with different sized images. I don't want to loop through with all images I want to display 3 images in different column by order. How could i do that? any help would be appreciated. Here I am providing my code which doesn't work.

 <div class="row fm-about-gallery-grid">
     <?php if( have_rows('fima_check_courses_images') ): ?>
     <?php while(have_rows('fima_check_courses_images')): the_row();
     $fima_check_courses_image = get_sub_field('fima_check_courses_image');
      ?>
        <div class="col-sm-7">
           <div class="fm-about-gallery-image">
            <?php if($fima_check_courses_image):?>
       <img alt="" src="<?php echo $fima_check_courses_image[0]['url']; ?>">
            <?php endif; ?>
            </div>
         </div>
         <div class="col-sm-5">
         <div class="fm-about-gallery-image">
       <img alt="" src="<?php echo $fima_check_courses_image[0]['url']; ?>">
         </div>
         </div>
       <div class="col-sm-12">
       <div class="fm-about-gallery-image">
     <img alt="" src="<?php echo $fima_check_courses_image[0]['url']; ?>">
       </div>
       </div>
       <?php endwhile; ?>
       <?php endif; ?>
  </div>

You can do using following code. Here i use css classes array and counter which help you achieve your functionality.

   <div class="row fm-about-gallery-grid">
       <?php if( have_rows('fima_check_courses_images') ): ?>
       <?php 
         $classarray=array("col-sm-7","col-sm-5","col-sm-12"); // add columns classes
         $index=0; //counter
         while(have_rows('fima_check_courses_images')): the_row();
         $fima_check_courses_image = get_sub_field('fima_check_courses_image');

  ?>
    <div class="col-sm-<?php echo $classarray[$index];?>">
       <div class="fm-about-gallery-image">
        <?php if($fima_check_courses_image):?>
   <img alt="" src="<?php echo $fima_check_courses_image['url']; ?>">
        <?php endif; ?>
        </div>
     </div>       

   <?php 
   $index++; 
   if($index==3) break;
   endwhile; ?>
   <?php endif; ?>
   </div>