I’m continuously running in to problems between local and unlocal.
When I’m building my site locally and I upload images, they go like:
<img src="http://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="http://localhost:8888/wordpress/','src="/wp/', $curl); $curl = str_replace('href="http://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.
- The topic ‘Trouble with images displaying locally and in web’ is closed to new replies.