• Resolved searchen

    (@searchen)


    Is there any reason why I should not use relative URLs for the link to my images in posts?

    I have just had to change hosts, and many URLs were taken over with Absolute URLS to the old Host…

    Can I use the format: “../wp-content/uploads/2010/08/image.jpg”?

    I am only considering this for changing all the old URLs via “Search & Replace” plugin.

    Thanks
    Peter

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Is there any reason why I should not use relative URLs for the link to my images in posts?

    If you use relative URLs, your images won’t show in feed readers as the URLs will be relative to whatever domain the feed reader is in. For example, if a subscriber is watching your feed in Google Reader, your images will attempt to load relative to google.com/reader.

    Thread Starter searchen

    (@searchen)

    Aha! Thanks for this clarification.

    My concern is that at present, I am testing on a temporary subdomain, provided by the new host, after moving a blog from another host.

    In the process of importing, about 50% (about 180) posts somehow brought over the Image src of the old Host. (How come the other 50% converted correctly??) Hmmm!?

    If I were to do a Search and Replace now, while testing, it would show the temporary domain. Probably it would then be intelligent to do a search & replace for the “real” domain and wait till I have propogated the domain?

    Thanks
    Peter

    Moderator James Huff

    (@macmanx)

    Since you’re just testing, I’d leave them relative now and do the final search/replace when you’re ready to move to the main domain.

    Thread Starter searchen

    (@searchen)

    James… thanks for the advice.

    It’s just that if half the photos in a photoblog do not display (during testing), it makes me a bit nervous!

    Cheers and thanks
    Peter

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    If you need to, I see no reason to avoid changing them now, but you may encounter the same problem when you move.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Use relative or absolute URLs for image src?’ is closed to new replies.