WordPress.org

Ready to get started?Download WordPress

Ideas

Relative path for images/uploads?

  1. dcoi9
    Member

    12345

    I think this would be an excellent addition!!! Great Idea!!!

    Posted: 4 years ago #
  2. From an SEO perspective, using absolute paths is preferable. If relative paths are used then it could affect rankings in image search at Google, for instance, since the the same image could be reached using multiple non-canonical URLs like http://example.com/images/xyz.jpg and http://www.example.com/images/xyz.jpg and if you allow https then also https://example.com/images/xyz.jpg and https://www.example.com/images/xyz.jpg. Relative paths would take on whatever domain and protocal was used to render the page where they live.

    It's preferable to have ONE URL to reference every object and page on your site called the canonical URL. Having multiple ways to refer to the same object or page can lead to split link equity and duplicate issues.

    But there should definitely be somewhere in the settings section where you can have a default protocal/domain prefix for all images. But you'd probably want a field on every image to override this in case some need to be accessed using a different protocol (like https).

    Tommy Lee

    Posted: 4 years ago #
  3. thevolts
    Member

    SEO aspect is fine, but when i have over 600 posts and every post having an average of atleast 2 posts. I would have to change the the URL for about 1200 images, which is too much.
    it would be great if there could be a plugin that could do an overwrite the existing url. somewhat in similar lines to what "seo smart links" plugin(not exactly the same function). But finding a particular string pattern and replacing it with the new term.

    Posted: 4 years ago #
  4. Devin Price
    Member

    Use the Search and Replace plug-in:

    http://wordpress.org/extend/plugins/search-and-replace/

    You can run the find/replace on post data, meta data, etc. I've never had a problem updating everything in one go.

    Posted: 4 years ago #
  5. fxcraz
    Member

    it would be great if there could be a plugin that could do an overwrite the existing url. somewhat in similar lines to what "seo smart links" plugin(not exactly the same function). But finding a particular string pattern and replacing it with the new term.

    for example :

    http://www.forextradingevo.com/forexbrokers.html

    Posted: 4 years ago #
  6. scribu
    Member

    A similar, but more specific proposal is an image shortcode:

    http://core.trac.wordpress.org/ticket/11394

    Posted: 4 years ago #
  7. The Search and Replace plug-in is great but it would be great if such features can be integrated into wordpress.

    Posted: 4 years ago #
  8. jcraig
    Member

    We’ve created a new WordPress plugin due to seeing several help forum posts on WordPress.org. We’re happy to give back to the community and hope you enjoy. The Relative Image URLs Plugin does the following. When inserting an image into WordPress posts, WordPress uses absolute URLs to the files. This plugin overrides that functionality and forces it to use relative URLs. For example:

    WordPress Default:

    http://www.example.com/wp-content/upload/04/20/example.jpg

    Plugin Override:
    /wp-content/upload/04/20/example.jpg

    This is particularly useful if you plan on switching domains ever and has been requested in several help threads.

    http://www.bluelayermedia.com/wp-plugin-relative-image-urls

    Posted: 4 years ago #
  9. jcraig
    Member

    @moshxsoft, that IS a plugin..;)

    Posted: 4 years ago #
  10. Laufen Willi
    Member

    Is there a help in german to get the relative path?

    Bye
    Laufen Willi

    Posted: 4 years ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    223 Votes
  • Status

    Duplicate of another idea