So I'm using drupal_get_path() within a block to reference an image in my themes//images directory.
And this works. At the root and all first level pages. example.com, example.com/about, etc.
However, if I am on a page such as example.com/about/csa:
Instead of continuing to output the filepath as /sites/all/... it outputs the file as //sites/all/...
This only happens when I'm in a subdirectory of the site.
Does anyone know why this might happen?
EDIT:
<?php $src = drupal_get_path('theme', $GLOBALS['theme']) . '/images/carrots.png';
echo '<img src=' . $src . ' alt="carrot background image" >'
?>