Support

Account

Home Forums ACF PRO Image ID & Alt Tag Reply To: Image ID & Alt Tag

  • Make sure that your Image field has the Return Format set to Image Array, then use the following code as an example:

    <?php 
    
    $image = get_field('image');
    
    if( !empty( $image ) ): ?>
    
        <img src="<?php echo esc_url($image['url']); ?>" alt="<?php echo 
    esc_attr($image['alt']); ?>" />
    
    <?php endif; ?>