Title: img src= ?php include TEMPLATEPATH&#8230; gets big mess
Last modified: August 19, 2016

---

# img src= ?php include TEMPLATEPATH… gets big mess

 *  Resolved [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/img-src-php-include-templatepath-gets-big-mess/)
 * This works:
    <?php include(TEMPLATEPATH.’/content.php’); ?>
 * This produces a ton of gobbledygook on the webpage:
    <img src=”<?php include(
   TEMPLATEPATH.’/images/hr.gif’); ?>” />
 * So does this:
    <?php include(TEMPLATEPATH.’/images/hr.gif’); ?>
 * What can I do besides entering the full [http://&#8230](http://&#8230); url?
 * This seems to work sometimes, I think:
    <?php include(‘wp-content/themes/mytheme/
   images/hr.gif’); ?>
 * This seems to work sometimes, I think:
    <?php include(‘images/hr.gif’); ?>

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/img-src-php-include-templatepath-gets-big-mess/#post-697614)
 * `<img src="<?php include(TEMPLATEPATH.'/images/hr.gif'); ?>" />`
 * you cannot use a php include to call an image file.
 * thats NEVER going to work.
 *  [Maxaud](https://wordpress.org/support/users/maxaud/)
 * (@maxaud)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/img-src-php-include-templatepath-gets-big-mess/#post-697650)
 * what about:
    `<img src="<?php bloginfo('stylesheet_directory'); ?>/images/me.
   jpg" alt="picture of me" />`
 *  Thread Starter [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/img-src-php-include-templatepath-gets-big-mess/#post-697890)
 * Thanks both –
    so php includes don’t work, but `<img src="<?php bloginfo('stylesheet_directory');?
   >/images/hr.gif" alt="test">` does work.
 * It works for iframes too!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘img src= ?php include TEMPLATEPATH… gets big mess’ is closed to new replies.

## Tags

 * [path](https://wordpress.org/support/topic-tag/path/)
 * [templatepath](https://wordpress.org/support/topic-tag/templatepath/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/img-src-php-include-templatepath-gets-big-mess/#post-697890)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
