Images not showing correctly I'm adding a logo image to my page.tpl.php template this way:

&lt;a class="mobile-brand" href="#"&gt;&lt;img src="&lt;?php print drupal_get_path("theme", "my_custom_theme"); ?&gt;/img/logo-mobile.png"&gt;&lt;/a&gt;


The image is being displayed fine in the homepage, but if I go to the /user page, for instance, the image won't show up.

Any ideas why is that happening?

Thanks!
Without a leading '/' (or '/foo/' if the site is in a subfolder) the browser will always to try to find the image relative to the current path, not to the root of the site. That's why your current code works on the home page, but not on other pages.

To fix it you just need to add the base path as well:

&lt;a class="mobile-brand" href="#"&gt;
  &lt;img src="&lt;?php print $base_path . drupal_get_path("theme", "my_custom_theme"); ?&gt;/img/logo-mobile.png"&gt;
&lt;/a&gt;