Home Forums Add-ons Repeater Field Images in Repeater not working


Images in Repeater not working

  • I am new to ACF and trying to create a products page, but when working with images subfield while in a Repeater, the images are not working. The other texts subfields are working properly.

    I’ve tried a var_dump() and it’s returning null, however when making a

    <?php print_r(get_sub_field('fotos'));?>

    it returns me all the information.

    The same issue with the images not working is also happening with the Gallery fields.

    Please, find the code for the repeater issue

    <?php if(have_rows('fotos_do_produto')):?>
    		<?php while(have_rows('fotos_do_produto')): the_row();
    				$image = get_sub_field('fotos');
    				$picture = $image['sizes']['thumnail']; 
    		<h1><?php the_sub_field('name') ?></h1>
    		<pre><?php echo print_r(get_sub_field('fotos'));?></pre>
    		<img src="<?php echo $picture;?>">
    		<?php endwhile;?>
    <?php endif; ?>

    Please, find the link to the Json export

    thanks for your support

  • ‘thumbnail’ in your code is missing the ‘b’

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

You must be logged in to reply to this topic.