Support » Localhost Installs » WAMP won't show HTML images?!

  • Resolved schoolspeak

    (@schoolspeak)


    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    Forum Moderator

    You must use absolute urls for images in WordPress.

    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!!

    benjaminWP

    (@benjaminwordpress)

    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!

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

    benjaminWP

    (@benjaminwordpress)

    Ha ha – thanks again!

    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

    esmi

    (@esmi)

    Forum Moderator

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

    benjaminWP

    (@benjaminwordpress)

    <img src=”<?php bloginfo(‘template_directory’); ?>/images/IMAGENAMEHERE.jpg” title=”” alt=”” />

    Use this to display images locally

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WAMP won't show HTML images?!’ is closed to new replies.