Forums

[resolved] One image showing up, another not. (6 posts)

  1. Dynotaku
    Member
    Posted 2 years ago #

    Okay, what could cause this? 2 images in a directory. The php file calls them both with "image/pic1.jpg" and "image/pic2.jpg" One picture displays one one doesn't. If I change the url on the one that doesn't display to the full url with http:// and all that, it shows up, so I know it's there.

    What on earth is going on with that? Do I have a crappy host or something? Do I need to use the full URL all the time just in case?

    This is so frustrating. I've spent over 2 hours just trying to get my title bar to work. Should have taken me 2 minutes.

  2. nemci7v
    Member
    Posted 2 years ago #

    The image HTML should look like this

    <img src="wp-content/themes/your_theme/images/your_image.png" alt="..." />

    Check if that's right, otherwise paste the code you're using so we can understand what's going on.

  3. Dynotaku
    Member
    Posted 2 years ago #

    Wow that's weird. I got it to work if I put the wp-content/themes/your_theme/images/pic.jpg in. But that's only for img src links apparently, because background images that use the css background property work with just /images/pic.jpg

    Is that documented anywhere? Is that a quirk of wordpress or do I have a messed up installation? It's really irritating that I've spent so long on this.

  4. nemci7v
    Member
    Posted 2 years ago #

    Are you calling two background images from 1 div? If so, that won't work. You're probably doing a CSS mistake.

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    from within php files I normally do (assuming images are in images folder in my theme):

    <img src="<?php bloginfo('template_url'); ?>/images/image.png" alt="stuff" />

    which parses as the full url within the browser when loaded

  6. nemci7v
    Member
    Posted 2 years ago #

    Thanks Rvoodoo! I didn't think of that

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.