Image repeater with ACF pro doesn't show the Wordpress image sizes

Joined
Apr 7, 2016
Messages
337
Likes
225
Degree
1
I made an image repeater with ACF pro but it doesn't show the wordpress image sizes. Is there a setting or component I'm missing or is this not an option with the ACF image field?
 
I made an image repeater with ACF pro but it doesn't show the wordpress image sizes. Is there a setting or component I'm missing or is this not an option with the ACF image field?

You'll have to get the correct image size when you go to call the image in your PHP template:

Code:
$image = get_field('image');
$size = 'full'; // (thumbnail, medium, large, full or custom size)

if( $image ) {

    echo wp_get_attachment_image( $image, $size );

}
 
You'll have to get the correct image size when you go to call the image in your PHP template:

Code:
$image = get_field('image');
$size = 'full'; // (thumbnail, medium, large, full or custom size)

if( $image ) {

    echo wp_get_attachment_image( $image, $size );

}

Thanks, this worked great! I ended up echoing it like this:
Code:
<img class="aligncenter" src="<?php echo $image[0]; ?>" alt="<?php echo $alt_text ?>" />
 
Back