• hi,

    Recently, i’ve moved one of my blogs to another url, and when i did that, i’ve noticed all the images i’ve uploaded with the image gallery, was not visible, because the uploader does this: src=”https://mysite.com/wp-content/uploads/april/..”.. so at the moment i’ve changed the url, i have to go back and change the src one by one…

    Before wordpress 2.5 i was uploading every image as src=”../images/nameofthephoto.jpg” wich is more friendly in case you have to move your blog. Im so happy with the image uploader in 2.5, but i wonder if i can change the way it links the images to something like i was using, without getting the whole url…

    Any ideas?

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • you can run a SQL query on your database to change all occurances of

    https://olddomain.com to https://newdomain.com

    look at this page:
    https://codex.www.ads-software.com/Changing_The_Site_URL

    The only part of that page relevant to you at this point is
    2. Database Entries
    It contains the instructions for how to change all the links using one query. (My suggestion assumes the location of your images is still the same as it was on the old blog, except on a different domain. That is, they are still the in same folder locations in relation to the rest of your WP installation)

    The other part of that page that is quite relevant is:
    BACK UP YOUR DATABASE before you even think about doing this!!!!

    Thread Starter megharah

    (@megharah)

    thank you, but i was asking if there is a way to force the image uploader to do the linking without the url, or to change the default path where and how uploads the images, to the a folder called images or photos on the root of the server…

    all the links are already changed, so that doesn’t really matters, im only worried about future uploads

    Thanks ??

    Thread Starter megharah

    (@megharah)

    bump

    yep, you can change the default path

    settings > misc > Uploading section

    Thread Starter megharah

    (@megharah)

    discojing>

    Woa… so simple, im almost ashamed.. LOL, thanks a lot ??

    Now, the thing is, in the post, the image still is called as

    <src=”https://www.mysite.com/photos/photo.jpg&#8221; />

    so i guess it could be solved by deleting the url each time, but maybe there is a way that WP do the src’s like this by default:

    <src=”../photos/photo.jpg” />

    *Crossing my fingers for someone with the solution*

    Thanks!!

    Thread Starter megharah

    (@megharah)

    bump

    um, I think you might have to change each post.
    Or maybe try opening the post and then saving it to see if Wp auto changes it? Other than that, try doing something with the image library (i’m unfamiliar with 2.5.1’s media library) so, good luck!

    sometimes, you just gotta do everything ALL over (hopefully thats not the case though)

    I am having the same issue and don’t want to re-upload all my images. They are in the correct folders -just linking to my old domain. Don’t know what to do.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Image paths’ is closed to new replies.