show thumbnail for subcategory wordpress

WordPress taxonomies (Categories and Tags) do not have featured images, so there is nothing ‘standard’ that you can use. Therefore you need to customise your code to suit by using Custom Fields to extend the taxonomy to include an image.

However, manually coding this becomes somewhat more complicated when using Images from your media library so you may find it more convenient to use a plugin to create and manage these custom fields for you. In the link above, you will see three plugins listed at the bottom of the page. I only have experience of Advanced Custom Fields but using that plugin I have added Images to Categories and output them as per your example, so its definitely possible. There are plenty of help pages to assist you with this.

As for showing the empty categories, thats simply a case of adding an extra argument to your get_categories function, like this:

$args = array('parent' => 17,'hide_empty' => false);
$categories = get_categories( $args );