2

Previously my images were present in default/files folder ,i want to move them in theme specific images . priorly i accessed them via but i want to give relative path of themes images folder now in block body .

Can anyone please guide how it can be achieved . I assume my folder is not present at root level so <img src="/sites/all/themes/.." > will not work .

1 Answer 1

3

Refering to this answer you should use base_path() function and path_to_theme() :

Example :

<img src="<?php print base_path() . path_to_theme() .'/' ?>images/img.jpg" />
1
  • Issue was resolved by assigning permissions to administrator that was the reason why php code was not executed . May 13, 2015 at 7:56

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.