Hello Everyone,

I am having difficulties displaying images on my web site. I have three images on my home page that navigate users to their relative sections. These images do not need to be dynamic and neither do the links. Easy, right? This is my code:

<ul id="toplevelnavlist">
  <li><a href="#"><img src="images/placeholder.jpg" alt="New Media Development" title="New Media Development" /></a></li>
  <li><a href="#"><img src="images/placeholder.jpg" alt="Consulting Services" title="Consulting Services" /></a></li>
  <li><a href="#"><img src="images/placeholder.jpg" alt="Our Team" title="Our Team" /></a></li>
</ul>

This code is standard XHTML, why does it not show up on my page? Only the "alt" tag message is displayed, like its a broken image. But the file reference is correct unless I need to insert the images into my database, and call them from there to make them work.

Why are my images not appearing?

Sincerely,

Jerry Kobylt
http://www.jerrykobylt.com
http://www.guerillainc.com - Under development on my local server, placeholder for now

Comments

driftingusername’s picture

How about trying absolute URLs for the images?

<img src="images/placeholder.jpg" ...> seems to be equivalent to
<img src="http://my.driftingname.com/node/images/placeholder.jpg ...> on my.driftingname.com site.
rather than
<img src="http://my.driftingname.com/images/placeholder.jpg ...>, which is the right one.

srlinuxx’s picture

I don't know what href="#" is and what it's doing, but assuming you do :D, perhaps use /images/placeholder.jpg. Since about 4.5 or so (I don't recall when exactly), we've had to put the leading / in relative paths. Try that and see what happens.

-

-You talk the talk, but do you waddle the waddle?

NancyDru’s picture

<img src="/images/placeholder.jpg" alt="Our Team" title="Our Team" />

Nancy W.
now running 5 sites on Drupal so far
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in Your Database

jkobylt’s picture

Thank you everyone.

I used an absolute path and it works. Now, my next question is:

How do I upload pictures into the Drupal database? Then, call them from their location in the database?

Thanks a bunches!

Jerry K
http://www.jerrykobylt.com

NancyDru’s picture

Just upload with FTP unless you want to get fancy. If you do, then check the Image module. If you want galleries of pictures, then that one or Acidfree (also uploads).

Then use the paths like I showed or the full path. BTW, I always use a relative path so that I can have a test site that works just like the live site.

Nancy W.
now running 5 sites on Drupal so far
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in Your Database

pwrdesign’s picture

hi!

I have to ask this question again..
I'm trying to add an image into a block, but I cant get it to work, dosnt drupal accept pure HTML?

Regards Patrik

<img src="http://www.mysite.com/images/image.jpg">

NancyDru’s picture

Check your HTML page source and make sure that what's coming out is what you expect.

thepocketgeek’s picture

What if there is nothing where the image tag should be? I have tried using the filtered HTML, Full HTML and the PHP modes and nothing...