Hi all and sorry for this question (i'm a very beginner with drupal and php).
I would to add a link (to an url) to this image (xxx.png), is it possible?

<?php $getthis = file_directory_path()."/xxxx.png";
//theme_image($path, $alt = 'xxxxx', $title ='xxxxx', $attributes = NULL, $getsize = TRUE)
print theme('image',$getthis);
?>

Many thanks
b

Comments

vj’s picture

$img_path= base_path() . path_to_theme();
<a href="http://drupal.org/"><img src="<?php print $img_path ?>/images/xxx.png" alt="" /></a>
bardill’s picture

Many thanks vj!
But it don't work :/

prakashp’s picture

I'm not sure if I understand your question correctly. If you'd like to get a link to your image, you can try this

  $img_path = file_directory_path() . '/xxxx.png';
  print l('Link to image', $img_path, array('absolute' => true));