[wp-hackers] Why always absolute paths?

Bumbu Alex bmbalex at gmail.com
Wed Apr 21 11:46:29 UTC 2010

if you use sef url and you'll give relative path for the image (ex.

so on page _http://page.com/ you'll have src to _
and on page _http://page.com/last-news/ you''l have src  _

so you can observe that browser will look into different paths for the same

you can use such src as /images/top.jpg and for the above examples you'll
have tha same link _http://page.com/images/top.jpg
but when somebody will have WP installed in subdirectory, but he will use
default template, instead of getting
he will have


so only using absolute path is friendly for all cases

p.s. when I am doing my templates(for any CMS) I try to include all possible
images through css, so usually I have no images, or few of them (I am
speaking about images from template but not from posts)

More information about the wp-hackers mailing list