WordPress.org

Ready to get started?Download WordPress

Forums

images (2 posts)

  1. germinus1
    Blocked
    Posted 1 year ago #

    Not really sure how to explain this, I have various pages that have images on, I have been transfering these pages from joomla to WP by copying and pasting the html. So the image path was for example

    <td><img src="images/stories/passed/Chris_passed_17th_May_2012.jpg" alt="Chris_passed_17th_May_2012" width="360" height="480" border="0" /></td>

    I have copied this to WP and made sure the relevant folders are present in the joomla root. The above code is part of this page...

    http://www.david-webb-adi.com/passed-with-david-webb/

    The images are not showing, now for some reason WP is putting part of the url as the image path. So the image path that was

    images/stories/passed/Chris_passed_17th_May_2012.jpg

    is now

    passed-with-david-webb/images/stories/passed/Chris_passed_17th_May_2012.jpg.

    Yet when I go to edit page in the html it still has the path as images/stories/passed/Chris_passed_17th_May_2012.jpg

    I decided for a quick fix I would just add the folders in the root to match the image path, however as soon as i did that I got a 404 error when viewing the page which makes no sense at all! As soon as i deleted the folders from WP root I could then view the page again???

    Any ideas?

  2. rachelbaker
    Member
    Posted 1 year ago #

    Add a beginning '/' to your image urls.

    Instead of the pasted relative path of:

    images/stories/passed/Chris_passed_17th_May_2012.jpg

    you can use:

    /images/stories/passed/Chris_passed_17th_May_2012.jpg

    the beginning '/' points to your domain root.

    Now the BEST solution here would really be to use the WordPress bloginfo function to correctly set the path to your images.

    Good explanation of relative path urls: http://www.boogiejack.com/server_paths.html

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.