• I’ve started designing a custom theme on my local server (https://localhost/project/), added a few pages with images (that I uploaded when editing the posts / pages).

    I then created a DynDNS.org alias for my server so the client could see it and continued theme development and then added a few more pages with uploaded images.

    In a few days, I’ll be uploading the final version to their server and there’ll be some more editing and uploading pictures.

    The problem is that the images uploaded in the first stage appear with src="https://localhost/project/...", the ones in the second stage appear with src="https://dyndns_alias.org/project/..." and the ones in the last stage will be src="https://www.their_server.com/..."

    Now, as I’m still in the second stage of development, the images uploaded in the first stage don’t appear (I manually edited some, but there’s a large volume of data to be handled) and I’m worried that in the next stage, I’ll have even more work to do.

    Is there a way for images in posts / pages to have a relative path ? Is there a plugin for this ?

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

    (@r4zv4n)

    In the meantime, I ran an SQL query on the WP DB to quickly replace img paths:

    UPDATEwp_posts`
    SET post_content = REPLACE(post_content,’src=”https://127.0.0.1/’,’src=”https://dyndns_alias.org/’)`

    However, a plugin (or maybe even integration) that would do a bloginfo('url') in the uploaded img’s path would be great. Anyone know of one ?

Viewing 1 replies (of 1 total)
  • The topic ‘img’s in posts / pages – relative paths’ is closed to new replies.