How do I add woocommerce hook based on product categories?

I’m adding an image to the woocommerce_product_thumbnails hook. What I want is that the image I added appears in the products that have the product categories I selected, how can I do this?

The hook I use

add_action( 'woocommerce_product_thumbnails' , 'wd_add_below_prod_gallery', 5 );  function wd_add_below_prod_gallery() {     echo '<div class="wd-add-image">';     echo '<img src="#" style="width:50%; margin: 0 auto;"></div>'; }