I want to get categiries image and path in Catalog Block for Ubercart 3 (Drupal 7) which is taxonomies. I know only tid.

For path i try this

$tid = (int)$variables['catid']; // return tid
$term = taxonomy_term_load($tid);
print_r(entity_uri('node', $term));

but site crashed.

1 Answer 1


I'm guessing you're looking for something like:

$term = taxonomy_term_load($tid);
if ($image_items = field_get_items('taxonomy_term', $term, 'field_name')) {
  $uri = $image_items[0]['uri'];
  $external_url = file_create_url($uri);

Where field_name is replaced with the name of your image field.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.