You can use get_object_taxonomies() as your solution.
Returns all the taxonomies for a post type or post object:
<?php get_object_taxonomies( $object, $output ); ?>
Have you tried anything? something like this?
// taxonomy term archives
$post_type = get_post_type(); // find out if CPT
$taxonomies = get_object_taxonomies($post_type); // Find taxonomies
if($taxonomies){
foreach($taxonomies as $taxonomy){
// only want hierarchial -- no tags please
if(is_taxonomy_hierarchical($taxonomy)){
$terms = get_terms($taxonomy); // find out "terms" e.g. catoegries, for each taxonomy
foreach ( $terms as $term ) { ?>
$term_link = get_term_link($term->slug, $taxonomy);
$term_name = $term->name;
//Image section like below...
if (function_exists('z_taxonomy_image_url')) { ?>
<img class="category-thumbnail" src="https://wordpress.stackexchange.com/questions/196673/<?php if (function_exists("z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
<?php }
}
}
}
}
This how you can get taxonomy with image.
The Categories Images Plugin(https://wordpress.org/plugins/categories-images/) allow you to add image with category or taxonomy.