• Resolved hockey9999

    (@hockey9999)


    Hi, I’ve got two wordpress installations on my web host. The first one is in the root directory and the second one is an addon domain that has its own directory with the wordpress installation.

    When I am working with images on the root directory I would make a folder in root called images and would have the ability to simply use the relative URL as so: /images/theimagenamehere.jpg when using the <img src tag, instead of the absolute path. I can use the relative path in the backend when editing the PHP files, and also inside the WYSIWYG editor so that the image would show up on the front end.

    When I try to do the same thing as above with the second WordPress installation that is not located off the root, the images will not display and show the broken image link icon. When I right click and select ‘open link in new tab’ using the src=’xxx’. It takes me to the path domain.com/images/theimagenamehere.jpg. So it seems that the path is fine, but I am not sure what is going on. I thought maybe it might be referencing the images folder in the root, so I tried to use an image from this directory, but still nothing. Could someone please help me? I know the common response will be ‘use absolute links’, however I would like to use relative links. If I upload the images via media in the backend and take the absolute URL, it works, however I do not like doing it this way. Any help is appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter hockey9999

    (@hockey9999)

    I found out what my problem is, just a matter of location. I didnt have the folder in the correct spot.

Viewing 1 replies (of 1 total)
  • The topic ‘Relative image URL links’ is closed to new replies.