jackrabbit-d
10/18/2017 - 2:23 PM

ACF Output Image using ID

If for some reason you need to use ID vs array. Always use array output if you can.

<?php 
$imgSrc = get_field('field_name'); 
$img = wp_get_attachment_image_src($imgSrc, 'image-size'); ?>
<?php echo $img[0]; // Outputs URL ?>
<?php echo $img[1]; // Outputs Width ?> 
<?php echo $img[2]; // Outputs Height ?>