Advanced Custom Fields (ACF) Repeater get image URL

Last updated on

To get the image URL for an image field type in Advanced Custom Fields (ACF) Repeater Field

<?php if( have_rows('repeater_field_name') ): ?>

	<?php while( have_rows('repeater_field_name') ): the_row(); 

		// vars
		$image = get_sub_field('image');
		?>

		<img src="<?php echo $image['url']; ?>" />

	<?php endwhile; ?>

<?php endif; ?>
1 Star2 Stars3 Stars4 Stars5 Stars 5.00 (3 votes)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

3 replies

avatar
  Subscribe  
newest oldest
Notify of
Sasha
Guest
Sasha
Sasha
1 year ago

Not working………………image path broken
shows 404 error

Sasha
Guest
Sasha
Sasha
1 year ago

Not working

mohit tyagi
Guest
mohit tyagi
mohit tyagi
1 year ago

after this please echo your image