Support » Fixing WordPress » Permalinks and images in articles

  • spacerook

    (@spacerook)


    Hi,
    I’ve gotten permalinks to work on WinXP. But another problem was caused.
    I had an image embedded in an article whose source was images/pic.gif. The image showed up fine on the main page, but when you went to the article via the permalink, the image was not found.
    Has anyone else observed this behavior? I’m assuming it’s a mod_rewrite issue. But why are the images missing? Is mod_rewrite messing up their path?

Viewing 7 replies - 1 through 7 (of 7 total)
  • TechGnome

    (@techgnome)

    because the path was relavite (no leading / on the front of the images) so it’s going to try to look for http://www.your-site.com/blog/2004/02/23/My-post-title/images….
    which of course doesn’t exist.
    If you change your img src to include the leading /, then it shoudl be OK again.
    TG

    Hmm.. I noticed this post and checked mine – same problem.
    I’ve just tried adding a / to so it’s like this image src=”/pix/image.jpg” and now they don’t show up in my page.
    I’ll have to move the images folder I guess 🙂

    tcervo

    (@tcervo)

    Have you tried the full url? (http://www.yoursite.com/images/image.jpg)

    Ahhhhhh!
    I wrongly assumed that because I have hotlinking stopped, a full url would not work.
    But it does.
    Thanks !

    I don’t understand why having the “/” before the image will allow the picture to show up on the permalink page, but not the regular page…..

    …..and when removing the “/” from the start of the image link, it lets the picture show up on the regular page, but not the permalink.

    Is there any way around this other than using the full url to the image?

    “/” in technical parlance means start at the root of the directory path (in this case, the top of a site). So that:

    /file.jpg

    Means look for file.jpg in the root directory, and

    /images/file.jpg

    Says to look for file.jpg in a subdirectory to the root called “images”. Where are images stored on your site? Also, a link would help in troubleshooting.

    I still disagree with TechGnome – regardless of having the / or no / leading the url, you are going to have a problem with either the main page or the permalink. Full URL is the only way as far as i know with permalinks then, unless anyone else wants to correct me?

    Because i know I’m going to be getting my own domain name for my blog sooner or later, this will potentially be quiiiiiiiiiite frustrating 🙁

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permalinks and images in articles’ is closed to new replies.