WordPress.org

Support

Support » How-To and Troubleshooting » Problem with images referenced in HTML

Problem with images referenced in HTML

  • Hello,

    I am busy assembling my own wordpress theme, but for some reason I cannot get the images I reference in HTML to show up in the browser. My CSS background images show up nicely, but if I go to insert an image in the HTML like: <div> <img src=”suchandsuch.jpg” alt=”suchandsuch” </div> I only get the alt text displayed in the browser.

    Any ideas?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sounds like you are calling an image that DOESN’T exist. Try with absolute URL.

    Yes, absolute URLs are the easiest in this situation. If you are putting images in your template files, and the images themselves are in that template’s images folder, you can use this:

    <img src="<?php bloginfo('template_url'); ?>/images/my-image.gif" />

    http://codex.wordpress.org/Bloginfo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with images referenced in HTML’ is closed to new replies.