Sometimes you need to call an image directly from your theme template if it isn't practical to do with css. This snippet works well for me.
Get raw version
php
<?php global $base_path; print "<img src='" . $base_path . path_to_theme() . "/img/filename.png' />"; ?>
Comments
doubouil commented 4 years 11 months ago
You can also use the theme image function like so :
Drupal 7
Drupal 6
Theme functions allows themes and module to alter the output, in this case a CDN module could use a different base path.