- Joined
- Apr 7, 2016
- Messages
- 342
- Likes
- 233
- 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?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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?
$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 ); }
<img class="aligncenter" src="<?php echo $image[0]; ?>" alt="<?php echo $alt_text ?>" />