Support » Fixing WordPress » Images Not Appearing

  • I’m developing my own WP theme from scratch so that it matches my website that I’ve designed.

    I am developing and running WP on my local machine using XAMPP.

    When I view the blog list page, none of the images appear. My theme is located within the xampp/htdocs/wordpress/wp-content/themes/mysite folder. Within that folder there is a /images folder, where all the image files reside.

    Within my WP .php file, I’m simply using a <img src=> statement to call the images, but they don’t appear.

    Does anyone have a clue why images do not appear? I’ve never had this happen before.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • rgwhitaker,

    What is the exact path you’re using to call the images? Should be dynamic, like this:

    <img src=”<?php bloginfo( ‘stylesheet_directory’ ); ?>/images/imagename.jpg” />

    Right now I’m just using a straight <img src=”images/image.jpg” width=”” height=””> tag.

    That worked!!!!!!!!!!!!!

    Thank you so much!!!!!!!!!!!

    Now, my inquisitive mind wants to know: why? Why does this tag work

    <img src=”<?php bloginfo( ‘stylesheet_directory’ ); ?>/images/imagename.jpg” />

    But not this?

    <img src=”images/image.jpg” width=”” height=””>



    Forum Moderator

    Relative paths/urls will not work in WordPress. You need to use absolute paths/urls.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Images Not Appearing’ is closed to new replies.