WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] WAMP won't show HTML images?! (9 posts)

  1. schoolspeak
    Member
    Posted 2 years ago #

    Hello. I am thinking this is a WAMP issue.

    I'm working with WordPress on WAMP on a PC. Everything is working great except that I am unable to successfully show a foreground image. I thought for a while I was making some error in writing the HTML, but that's not it. I tested my HTML code:
    <img src="image.jpg">
    on a non-WAMP, non-Wordpress site, and the image appeared.
    I even tried absolute paths instead of relative, and that didn't work either.

    Background images are showing up fine. But sometimes, you just need a foreground image.

    For example, on page.php, my design is just fine. But then I try to insert <img src="1.gif"/>. Nothing. I'm using Dreamweaver so I know it's cited correctly. (The image is on the same level as my page.)

    I am hoping that when I actually make the site live, the images will show up. I have never actually activated a live WP site, though, so just doing so really quick is not an option as it will take a while and I'd like to get it right first!

    Thanks in advance for any replies.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    You must use absolute urls for images in WordPress.

  3. schoolspeak
    Member
    Posted 2 years ago #

    Thanks, Esmi. You got me on the right track.
    I needed to be using:
    <img src="http://localhost/site/wp-content/themes/themename/images/image.jpg"/>
    I'm back in business!!

  4. benjaminWP
    Member
    Posted 2 years ago #

    Can I just say thanks to both posters here. I have had the same issue too and now with esmi answer I can stop pulling out my hair and whacking me head off the desk!!

    joking - really!

  5. schoolspeak
    Member
    Posted 2 years ago #

    Happy to help, and save some hair in the process! (Yours and mine) :)

  6. benjaminWP
    Member
    Posted 2 years ago #

    Ha ha - thanks again!

  7. BrianBam
    Member
    Posted 2 years ago #

    So, I tried using the <img src="http://localhost/site/wp-content/themes/themename/images/image.jpg"/> format, but I still can't get my images to work. I'm currently working with the site locally and think that my issue may be the "site" name that I'm using. The part of the path kind of confuses me. Does the "site" portion of the path refer to site title under the general tab or the site URL in the general tab? Well, some details about what the "site" is and where it can be edited would be very helpful. thx

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    This topic has been resolved. Please post a new topic.

  9. benjaminWP
    Member
    Posted 2 years ago #

    <img src="<?php bloginfo('template_directory'); ?>/images/IMAGENAMEHERE.jpg" title="" alt="" />

    Use this to display images locally

Topic Closed

This topic has been closed to new replies.

About this Topic