Title: Adding image to my theme
Last modified: August 19, 2016

---

# Adding image to my theme

 *  [courtelise](https://wordpress.org/support/users/courtelise/)
 * (@courtelise)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/)
 * I have wordpress on my laptop and I’m currently editing a custom theme offline.
   In my theme folder, I created an images folder. My background images work perfectly
   fine from this folder.
 * I placed an image in that folder that I want to use within a paragraph in my 
   header. However, <img src=”images/imagename.gif” …etc> returns nothing but a 
   broken image. Just the alt description displays.
 * Can someone tell me how to get an image to display in my theme? I also want to
   use this image as a link later on to a paypal shopping cart, but I’ll cross that
   bridge when I get there.
 * Oh, and while I am here… what’s the difference between a theme and a template?
   I don’t plan to distribute this theme. It’s for use on one of my company’s sites.

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

 *  [Saurus](https://wordpress.org/support/users/saurus/)
 * (@saurus)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931151)
 * You missed the first /images/imagename.gif:)
 *  Thread Starter [courtelise](https://wordpress.org/support/users/courtelise/)
 * (@courtelise)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931201)
 * Unfortunately, that did not solve my problem.
 * I can get it to display if I host it on Photobucket, but I would prefer to host
   it locally if I can.
 * Thanks!
 *  [Saurus](https://wordpress.org/support/users/saurus/)
 * (@saurus)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931202)
 * Wait … you’re doing this _locally_ – not from a web host? You’re not setup to
   localhost with a server and Apache on your laptop? If you’re not – you have to
   reference the local folder where the file is stored – your paths will not be 
   the same as they would from a web host.
 *  Thread Starter [courtelise](https://wordpress.org/support/users/courtelise/)
 * (@courtelise)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931203)
 * This is Local… on my laptop… just as I would build a regular site before posting
   it to the web.
 * I have an images folder inside my theme folder. I referenced that images folder
   when calling for my background images in my CSS file just fine. But when I try
   to reference that folder to call for an image in my header.php file… it does 
   not work.
 * Is that folder referenced differently from a php file? Sorry, this is my first
   theme. 🙁 I appreciate the help.
 * Edit to add… I use xampp if that helps.
 *  [dhanediesil](https://wordpress.org/support/users/dhanediesil/)
 * (@dhanediesil)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931369)
 * Courtelise,
 * We’re two peas in a pot. I to am working on my first theme to release and ran
   into the same image problem. After finding your post and pouring through the 
   forum, I found a solution.
 * When you reference your image in the “img src” first place this php function 
   after you open your quotations: <?php bloginfo(‘stylesheet_directory’); ?> and
   then reference the image as usual.
 * Ex. `<img src="<?php bloginfo('stylesheet_directory'); ?>/images/image.jpg" alt
   ="whatever"/>`.
 * That should work. It worked for me. Hope this helps (especially if you still 
   haven’t resolved the matter).
 * By the way, I’m using MAMP on my Macbook to build the theme first. So the issue
   of whether the theme is being hosted locally or not shouldn’t really matter.

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

The topic ‘Adding image to my theme’ is closed to new replies.

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * 5 replies
 * 3 participants
 * Last reply from: [dhanediesil](https://wordpress.org/support/users/dhanediesil/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/adding-image-to-my-theme/#post-931369)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
