Forum Moderators: open

Message Too Old, No Replies

Image SRC convert relative to absolute...

relative absolute path image tag src

         

ethan

7:47 pm on Aug 20, 2004 (gmt 0)

10+ Year Member



Hi there,

It happens to me that I'm developing a site that at some point, it uses include ('path/to/file.html') from a script that is at root level.

The problem is that this file.html has the images in its folder and the IMG tag has the SRC relative to file.html, so the images appear broken because the browser resolves the path of the images relative to the script that includes this file, that is in another folder. Ideally I would use absolute paths for the images of those files, but I can't so I have to find another sollution...

My question is:

As the generation of this files is done with a software that only makes the image src attribute relative to the generated folder, does someone know any program that can take an html file and change the base folder of the images or convert to absolute paths?

thx!

Xuefer

3:40 am on Aug 22, 2004 (gmt 0)

10+ Year Member



take a look at google's cached page
<base href="..">