get_queried_object()->term_id;
OR
$taxonomy = get_queried_object();
$current_tax = $taxonomy->term_id;
Get your term details by term name based for custom taxonomy.
$term = get_term_by('name', 'metal-idols', 'prod_tax'); // replace them with correct/appropriate values
check if current taxonomy/category equals what we get in $term, then you can change dimensions for that product else go on with current dimensions.
for example :
if($current_tax == $term->term_id) {
// These parameters will be for particular category/taxonomy
$width = '';
$height = '';
} else {
$width = '';
$height = '';
}
You can use dimensions or code in if else condition the way you need to use.
]]>