Image Paths in 1.5 (2 posts)

  1. Harvey
    Posted 10 years ago #

    Hello all,

    I keep my images in the directory just below my /wp/ directory, in a folder called /images/.

    I have been unable to hit my images, I can't get the relative path right from my posts.

    <br />
    <img src="../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="../../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="../../../../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />
    <img src="/../../../../../../../../../images/event1.jpg" ALT="Event1" border=1/><br />

    I even tried to brute force find it!

    So far I have been unable to get it, unless I uase the absolute path to the image, starting with http:// and going all the way there.

    This is fine, however if I ever move my site, it's going to be a pain to rename all the links!

    Any advice on this? I have no idea why I can't hit it relatively...

    - Harvey

  2. Mark McKibben
    Posted 10 years ago #

    If you're using Apache's mod_rewrite rules for cleaner permalinks (e.g. http://example.com/wp/archive/2005/06/09/postslug/ vs. http://example.com/wp/index.php?p=27) then the relative path will change depending on how the user got to the post. This being the case, you're better off putting in the absolute path any images you add to a post.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.