• For anyone looking for a quick answer:
    I tried (and works) using a path relative link ./wp-content/uploads/2012/12/img.jpg. If you’re unfamiliar, adding the “.” in front of the leading “/” will direct you to the working directory.

    I was looking for an answer to this on the forums and all the posts I read degenerated into off-topic arguments on the merits of permalinks etc, but nobody ever addressed the how.

    As a developer I develop on a test server and often need to move the entire installation later. The efficacy of relative links is obvious.

    I’m posting this 1 as a quick answer to something I couldn’t find and 2 to ask if there is any reason not to do this.

    The permalink argument seems to me like it would address the URL more than an image as, so long as the site doesn’t move, the URL would remain the same therefore the relative link would still work. Thoughts?

  • The topic ‘Relative Link To Media Folder’ is closed to new replies.