I am trying to show taxnomy image but I can’t do this please help
<?php
$category = get_category( get_query_var( 'cat' ) );
$cat_id = $category->cat_ID;
$category_per_page = 2;
$page = 1;
$offset = 0;
$taxonomy = 'category';
if (!empty($_GET['page'])){
$offset = ($_GET['page'] - 1) * $category_per_page;
}
$tax_terms = get_terms( $taxonomy, array( 'parent' => $cat_id,'number' => $category_per_page, 'offset' => $offset , 'hide_empty' => false ) );
$totalCategories = get_terms( $taxonomy, array( 'parent' => $cat_id, 'hide_empty' => false ) );
$totalNumber = sizeof($totalCategories);
$totalPagination = round($totalNumber / $category_per_page);
$current_term = get_queried_object();
foreach ($tax_terms as $tax_term) :
$args=array('cat' => $tax_term->term_id,'showposts'=>16);
$query=new WP_Query($args);
?>
<div class="col-xs-12">
<div class="heading">
<?php
$images = get_field('cat_img', $taxonomy . '_' . $tax_term->term_id );
echo '<img src="'.$images.'"/>';
?><h3 class="heading-title"><a href="<?=esc_attr(get_term_link($tax_term, $taxonomy));?>" title="<?=the_title();?>"><?= $tax_term->name;?></a></h3>
</div>
</div>
<?php endforeach;?>