1

I'm creating a module and need to add some images to the admin part of it. I've created an images folder in my module folder but I'm not sure how to get the exact path to the images to echo them in my module.

1
2

The following code example presents how to get the full path to an image-test.jpg image included in a simpletest module.

$image = theme('image', array('path' => drupal_get_path('module', 'simpletest') . '/image-test.jpg'));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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