• Hello,

    I’m continuously running in to problems between local and unlocal.

    Latest is:

    When I’m building my site locally and I upload images, they go like:

    <img src="https://localhost:8888/wordpress/wp-content/uploads/2008/01/image.thumbnail.jpg" />

    So, now when I put the site online the localhost:8888 blaablaa is of course wrong. I solved this based on the info I found from here. I edited the formatting.php file around line 28, added this:

    $curl = str_replace('src="https://localhost:8888/wordpress/','src="/wp/', $curl);
    $curl = str_replace('href="https://localhost:8888/wordpress/','href="/wp/', $curl);

    (wp is the folder where my files are)

    This worked like a charm, until, I changed the structure of my posts. Now where I want the image, is not anymore the “Post” field (in the admin panel), it’s a custom field, and obviously this upper mentioned hack effects only to the stuff written in the “Post” field, right?

    So, what to do? Is there way to chance the upper mentioned hack to take effect? Or chance the way I define the images, how would I do that?

    I use Flexible Upload plugin to upload.

    All help is appreciated very much.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Trouble with images displaying locally and in web’ is closed to new replies.