Support

Account

Home Forums General Issues get image alt in flexible field Reply To: get image alt in flexible field

  • Hi Kenneth,

    It depends how the Image field is setup. I prefer to have the image setup as the Image Object. You can select this when you create the field; return value.

    Then it is as simple as:

    $img = get_field('field_name'); // or use get_sub_field('field_name')
    echo $img['alt'];