WordPress.org

Ready to get started?Download WordPress

Forums

Problem with images (18 posts)

  1. larsen174
    Member
    Posted 9 years ago #

    Even if the url to images I think is correct the images are not uploaded ti the page. I'm working in local.
    Sorry for my english!

  2. Minna
    Member
    Posted 9 years ago #

    Does the image show up in the source code? Do you see the images when you look at one post alone? (click the title or something)

  3. Lorelle
    Member
    Posted 9 years ago #

    Images are interesting to link to. Here are a few tips:

    1. Use the root relative link method (add a slash before the address):
    <img src="/images/ball.gif" ..........

    2. Make sure the spelling is right for every bit of it. Look for forgotten quotes and the lack of a self-closing tag blah" /> at the end so it is valid XHMTL.

    3. Make sure that you use src and not scr which is what I do all the time because I hand type the stuff and I think it should be "screen" and not...whatever src means. ;-)

    4. Try uploading your images again with an FTP program and not WordPress, to make SURE it is there.

    5. Check the image file is in the right place and that the file size fairly closely matches the one your hard drive (that will tell you whether or not the entire file got uploaded and there wasn't a glitch in the uploading process - happens.).

    6. Make sure you totally refresh your browser screen to see if they appear.

  4. larsen174
    Member
    Posted 9 years ago #

    I've done everything you said, but it' doesn't work..
    <img src ="/images/name_of_the_file.jpg/>
    I don't know...

  5. kickass
    Member
    Posted 9 years ago #

    If absolute worst comes to worst, use an absolute path in the img tag, ie "http://yoursite.com/images/name_of_the_file.jpg". Not the best solution, but if it works . . .

  6. Jinsan
    Member
    Posted 9 years ago #

    <img src ="/images/name_of_the_file.jpg/>

    should read:

    <img src="images/name_of_the_file.jpg" />

    remember to add a HEIGHT and WIDTH to the image

    read this:
    http://academ.hvcc.edu/~kantopet/xhtml/index.php?page=images+in+xhtml&parent=xhtml+images

    src = source

    eg:

    <img src="images/name_of_the_file.jpg" alt="this is an image" title="this is an image of something I like" height="30px" width="30px" />

  7. larsen174
    Member
    Posted 9 years ago #

    so...
    I added everything You said as this:

    <img src="images/name_file.jpg" alt="logo" height="80" width="80" />

    and

    <img src="http://localhost/blog/.......

    but It' s still not working...

  8. Lorelle
    Member
    Posted 9 years ago #

    Okay, larsen174, post a link to the post that you are having the trouble WITH the link you are using in the post and we'll take a look from there.

    DO NOT use "localhost/blog" in your absolute address. Use "http://www.myexamplesite.com/images...."

    You do not HAVE to have the height and width, so let's leave that part alone until you have figured out the link. One step at a time.

    Try the absolute address again, with the right address and get a link to the problem post.

    Also, one last thing, run a validation on your site. You may have EVERYTHING right in the actual image link, but there might be a piece of code that is open and not closed or borked above where you have the link, in your post, in the template file, header...anywhere...that may need to be fixed in order for your image link to work. It can happen and we're just trying to rule everything out.

  9. Jinsan
    Member
    Posted 9 years ago #

    Although not REQUIRED it is good practice to add height and width if you're going to add it to your markup - this is so that when the page loads it already makes the space vacant for the image, making the thing load faster. it's simply good practice, and to discourage it is bad practice.

  10. YellowSwordfish
    Member
    Posted 9 years ago #

    I'm probably being stupid to suggest it but it's not just a case error is it? I had this problem recently and it was just that I had saved the image with an uppercase first character... Just a thought that catches people out sometimes...

  11. Jinsan
    Member
    Posted 9 years ago #

    yellowswordfish when you say case, are you talking as in upper and lower? that shouldn't matter, but still, it's worth a shot in one of those "just in case" freaky moments.

  12. Lorelle
    Member
    Posted 9 years ago #

    upper and lower case MATTERS.

    YellowSwordfish, you are very right. The different between "ThePicture.jpg" and "thePicture.jpg" and "thepicture.jpg" matters.

    Good catch. I don't know if it applies here, but it could. This is an old buggy thing that has irritated me for ages.

    Also, if you code with a word processor (ICKY), and use hypens, the hypen can come as a code like this:

    "the[-]red[-]ball[-].gif"

    or some other strange code effect, instead of the-red-ball.gif.

    There are many possibilities that could be the problem here. We just have to hope that we've have helped with as many choices as possible and one has to be the right one.

  13. Jinsan
    Member
    Posted 9 years ago #

    well pointed Lorelle - I need the example you stated to refresh my memory in that case yes it would matter as you correctly point out. What I tend to do is set my ftp client to set uploads to lowercase for the sake of consistency it makes life easier since you don't have to worry about using caps.

  14. YellowSwordfish
    Member
    Posted 9 years ago #

    Jinsan = ALL URLs are case sensitive and always have been. But if your site is running on MS IIS then it doesn't matter as IIS get's it's file info from the Windows API - which is NOT case sensitive. But Apache and other servers stick to the rules.

  15. Jinsan
    Member
    Posted 9 years ago #

    URLs are NOT case sensitive - filenames and paths can be but not the url. You won't see Microsoft.com and microsoft.com as two different sites because the rules ignore case sensitivity when it comes to DNS, it's to ensure that indentities remain unique. You can resolve a different IP to an url, but again it will ignore the case used for the url.

  16. larsen174
    Member
    Posted 9 years ago #

    I have to wait 3 days for the web space..
    so I can't post the the link..
    I've tryed to use IImage Brower plugin, but when I try to upload the image this appears: < the admid disabled this function>
    Maybe I'm stupid, but I can't understand...

  17. clancy
    Member
    Posted 9 years ago #

    You must use absolute uris, not relative uri’s.

    So the link to an image must not be
    <img src="pictures/image.jpg" alt="" />

    It must instead be
    <img src="http://www.example.com/pictures/image.jpg" alt="" />

    If you use relative uri’s, then any archived post will not display the image. It may, on the index page, but may not on the individual entry page or other pages.

  18. clancy
    Member
    Posted 9 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic

Tags