Home Forums Add-ons Gallery Field Size of Gallery and single image preview


Size of Gallery and single image preview

  • Hello,

    i have a field create with ACF Galley and i neet to put inside 10 image. I need to see this on sidebar.

    So i’ve create a PHP field with this code

    $images = get_field('gallery');
    if( $images ): ?>
            <?php foreach( $images as $image ): ?>
                    <a href="<?php echo $image['url']; ?>">
                         <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                    <p><?php echo $image['caption']; ?></p>
            <?php endforeach; ?>
    <?php endif; ?>

    But i see the image withe size that is more big for me and not display inline but one picutre on one line.

    I try some code but i don’t know how can i resize the image size (only for image on this field) and display avery image inline. Thanks

  • Hi @serviceweb

    If you see different thumbnail sizes, you need to enable the “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” option on “wp-admin > Settings > Media”. After that, you need to regenerate the thumbnail again using a plugin like this one:

    I hope this helps.

  • Hello…no i’ve alredy setting the crop thumbnail” but i have alredy the problem. I have one photo in one line. I can’t setting two photo in the same line 🙁

  • Hi @serviceweb

    If you need to make the images inline, please take a look at this page:

    Please learn more about CSS here:

    Hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Size of Gallery and single image preview’ is closed to new replies.