Title: Coding correct path to image source
Last modified: August 21, 2016

---

# Coding correct path to image source

 *  [upstartadv](https://wordpress.org/support/users/upstartadv/)
 * (@upstartadv)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/coding-correct-path-to-image-source/)
 * I’m pretty new to WordPress. I’ve created a child theme off of twentyeleven, 
   and I am wanting to add a logo into the header. I can get the div dropped into
   header.php and customize it via CSS. When I use html to insert image:
 * <div id=”logo”><img src=”../twentyeleven/images/SAAlogo.jpg” width=”180″ height
   =”54″></div>
 * or css, it does not display. The alt text does display. All div characteristics
   display, but not the image. Seems like the code isn’t properly pointing to the
   image. I’m not coding it correctly so the doc can find it.
 * I also tried:
 * <div id=”logo”>”<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg”
   </div>
 * Same result.

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/coding-correct-path-to-image-source/#post-4372608)
 * You should be using an absolute file path. Upload the image to the media library
   and then look on the right side of the screen to find the File URL – copy that
   to the code in your header.php file.
 *  Thread Starter [upstartadv](https://wordpress.org/support/users/upstartadv/)
 * (@upstartadv)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/coding-correct-path-to-image-source/#post-4372638)
 * The site is currently locally hosted. I thought my first attempt was an absolute
   path. I placed the image in the images folder in the parent, and then child theme.
   Neither worked.
 * Here’s my div id:
    <div id=”logo”></div>
 * I saw where the following code would work for child theme, but I’m not entirely
   sure where to place it.
    <?php echo get_stylesheet_directory_uri(); ?>/images/
   imagename.jpg

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

The topic ‘Coding correct path to image source’ is closed to new replies.

## Tags

 * [image source](https://wordpress.org/support/topic-tag/image-source/)

 * 2 replies
 * 2 participants
 * Last reply from: [upstartadv](https://wordpress.org/support/users/upstartadv/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/coding-correct-path-to-image-source/#post-4372638)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
