Forums

Automatic abbreviation of IMG SRC paths?? (3 posts)

  1. JeffryPilcher
    Member
    Posted 2 months ago #

    I upgraded to WP 2.8.4 a week ago. Now, whenever I copy/paste an image from one post to the next, and whenever I upload an image, Wordpress is automatically truncating the IMG SRC path.

    WAS:
    img src="http://thefinancialbrand.com/wp-content/uploads/2008/06/latest-stories.gif

    NOW:
    img src="../wp-content/uploads/uploads/2008/06/latest-stories.gif

    I don't want Wordpress substituting "http://thefinancialbrand.com/" with the ".."

    How can I return my settings BACK to the way they were?

    This is seriously screwing up my images.

  2. songdogtech
    Member
    Posted 2 months ago #

    If you use the uploader in the visual editor, WP will use those kinds of URLs. If you upload images into one directory via FTP, then you can control the URLs by using the HTML editor and manually entering the image location.

    Why do you say your images srcewed up? Are they missing on page display? Are you also uploading them via FTP?

  3. JeffryPilcher
    Member
    Posted 2 months ago #

    Within posts, WP is replacing the "../" with the current date of the post. So you end up with redundant and conflicting information when images are cut/paste.

    SHOULD BE WHEN PASTED:
    img src="http://thefinancialbrand.com/wp-content/uploads/2008/06/latest-stories.gif

    NOW, AFTER COPY/PASTE BETWEEN ARTICLES:
    img src="../wp-content/uploads/uploads/2008/06/latest-stories.gif

    WHICH, WHEN PUBLISHED, GENERATES SOMETHING LIKE THIS URL:
    img src="http://thefinancialbrand.com/wp-content/uploads/2009/09/wp-content/uploads/uploads/2008/06/latest-stories.gif

    WP is tacking the current date in front of an image that was already uploaded on another date. WordPress is trying to be "helpful" by swapping "../" as shorthand.

    The problem, in short, is WP auto-generating IMG SRC paths using this logic when copying/pasting images:

    (1.) WHEN COPY/PASTING IMAGES, REPLACE "http://domain.com/" WITH "../"

    (2.) THEN, WHEN PUBLISHING, REPLACE "../" WITH:
    http://domain.com/wp-content/uploads/currentyear/currentmonth/

    (3.) WHICH YIELDS THE FINAL "IMG SRC" PATH WHEN PUBLISHED
    http://domain.com/wp-content/uploads/currentyear/currentmonth/wp-content/uploads/imageyear/imagemonth

    currentyear/currentmonth is where any current uploads might be located, but imageyear/imagemonth is the actual date the image was uploaded.

    This new autoswapping shorthand WP is using ("../") is new for me in this WP upgrade. I just moved from 6.X. Everything else works fine. And I can manually override each "../" by typing in my own (CORRECT!) img src path.

Reply

You must log in to post.

About this Topic

Tags