Support

Account

Home Forums Front-end Issues issues displaying an image with the_field() Reply To: issues displaying an image with the_field()

  • Hi,

    It should works.

    You can also choose Image Object radio box then get the value with get_field_object('image'). It retrives an array with almost anything you need. For example you can get image url like below:

    $fields = get_field_object('image');
    
    <img src="<?php echo $fields['value']['url']; ?>" alt="<?php echo $fields['value']['alt']; ?>" />

    For seeing the whole array use <pre><?php print_r(get_field_object('image'))?></pre> somewhere in the loop.

    I hope that helps,