Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]

Try this code at the place where you want your gallery:

<?php
$images = acf_photo_gallery('gallery_images', $post->ID); /// gallery_images to slug pola galeria w ACF
if( count($images) ):
    foreach($images as $image):
        $full_image_url= $image['full_image_url'];
        $class = get_field('gallery_images_class', $id);
        echo '<img src="'.$image['full_image_url'].'" class="'.$class.'" >';
endforeach; endif;
?> 

Do try to check if ‘$id’ gives you the image/post id (not sure what is needed here).

EDIT:
Please check if $id and $class are correct. you can do this by using this code:

<?php
$images = acf_photo_gallery('gallery_images', $post->ID); /// gallery_images to slug pola galeria w ACF
if( count($images) ):
    foreach($images as $image):
        $full_image_url= $image['full_image_url'];
        $class = get_field('gallery_images_class', $image['id']);
        echo '<img src="'.$image['full_image_url'].'" class="'.$class.'" >';
endforeach; endif;
?> 

It could be possible that `$image’ in your foreach has an ID. Try to use that one instead.