Unable to change ACF Gallery image size

I don’t know how to change the size of images in my gallery. I’ve tried putting a class on the images and using css to change the size which doesn’t work as the class is just ignored. I’ve also tried changing the size using thumbnail, medium and large but the image wont grow any bigger than 150px by 150px. How can I change the image sizes and make them responsive?

<div class="container">
    <div class="row">
        <div class="col-md-12">

            $image_ids = get_field('gallery', false, false);

            $shortcode = '';

            echo do_shortcode( $shortcode );



            $images = get_field('gallery');

            if( $images ): ?>

                <ul class="row">
                    <?php foreach( $images as $gallery_images ): ?>
                        <li class="col-md-4">
                            <a href="<?php echo $gallery_images['url']; ?>">
                                 <img src="<?php echo $gallery_images['sizes']['medium']; ?>" alt="<?php echo $gallery_images['alt']; ?>" />
                            <p><?php echo $gallery_images['caption']; ?></p>
                    <?php endforeach; ?>
            <?php endif; ?>

Read more here: Unable to change ACF Gallery image size

Leave a Reply

Your email address will not be published. Required fields are marked *