WordPress Featured Image For SubCategory In Category Page

I am using the plugin for featured image to add on each category and I want to show all sub categories with thumbnail in category.php to that parent.
Each sub category has a unique thumbnail. How I have to do this?

Here is my code:

Read More
$thiscat =  get_query_var('cat'); // The id of the current category
       $catobject = get_category($thiscat,false); // Get the Category object by the id of current category
    $parentcat = $catobject->category_parent; // the id of the parent category

    if($parentcat == '0'){
    ?>
        <div class="categories">
            <?php 
                wp_list_categories( array( 'child_of'=> $thiscat, 'taxonomy'=>'category' ) ); 
                cfi_featured_image( array( 'size' => 'thumbnail', 'title' => 'This is a test...', 'class' => 'my-image', 'alt' => 'My image' ) );   
            ?>
        </div>
    <?php   
    }

I am getting all sub categories of parent in li and just one thumbnail where I am getting wrong let me know.

I want every subcategory have his own thumbnail with title and description in div.

Related posts