acf_field['key'], $object_id ); /*/ $image_id = $this->get_value( $object_id ); //*/ // $image_id = get_field( $this->acf_field['key'], $object_id ); $output = ''; if ( $image_id ) { if ( is_array( $image_id ) ) { // Image field is an object $output .= wp_get_attachment_image( $image_id['id'], [ 80, 80 ] ); } else if( is_numeric( $image_id ) ) { // Image field is an ID $output .= wp_get_attachment_image( $image_id, 'thumbnail' ); } else { // Image field is a url $output .= ''; }; } return $output; } }