Array:
<?php // Array $image1 = get_field('image_1'); $size = 'medium'; $thumb1 = $image1['sizes'][ $size ]; if( !empty( $image1 ) ): ?> <div class="photo"> <img src="<?php echo esc_url($thumb1); ?>" alt="<?php echo esc_attr($image1['alt']); ?>" /> </div> <?php endif;
ID:
// ACF = Image ID
$image_id_1 = get_field(‚image_1‘);
if( !empty( $image_id_1 ) ): ?>
<div class=“photo“>
<?php echo wp_get_attachment_image( $image_id_1, ‚medium‘, false, array( ‚class‘ => polaroid )) ?>
</div>