Custom fields and url

Hi,
I use custom fields to display images for each post.
I work on localhost so I’d like to use relative paths (/wp-content/uploads/…).
But my images work only when I use full url.
Where can be the problem?

Thanks Mittineague for your advices.
I really need to resolve it quick as I have to finish the contract.

One thing is strange or maybe this can help.
When in value of custom field I put

/wp-content/uploads/2010/09/works_40.jpg

, update the post, refresh the site and I look that at the source of the site I can see:

<img src="/wp-content/uploads/2010/09/works_40.jpg"

Thanks Mittineague for your opinion. I also guess there must be an easy solution for this.
I’ve tried with (as an example) with:

/wp-content/uploads/2010/08/works_93.jpg

But this path doesn’t work.

I haven’t tried Custom Field to include images in posts, but my guess is you just haven’t tried using the correct relative path yet.

Anybody?
I have many posts and images so when I’ll move my site form localhost into server, I’ll have a lot of manual work :frowning:

Great to learn you solved it :slight_smile:

Those darn “one little thing” bugs are often the most frustrating to solve.

I usually can put my head to working out complex logic and tracking down the general problem area a lot easier then figuring out those “hidden” syntax bugs.

And even then I don’t solve them as much as it is trying a bunch of variations until I’m lucky enough to hit upon it.

It’s working! :slight_smile:
Mittineague, you’re right. I was missing something really easy.
The relative path should look like this:

wp-content/uploads/2010/09/works_40.jpg

, not like this:

/wp-content/uploads/2010/09/works_40.jpg

I agree that it would be a real pain to need to edit a lot of posts. I can’t help but think you’re missing something easy but syntactically strict.

If you’re sure you’ve tried every possible path that should work I have 2 ideas.

Maybe you could use a base tag.

Or more likely, do something with htaccess to send requests for images to the right place.

Not ideal, but if you’re stuck it should work until you can figure out what’s going on.

Can anybody help with this?
I can only work locally (on my localhost). If I would have to edit every post on real server that’d be a lot of work :frowning: