Forum Moderators: open

Message Too Old, No Replies

"Calling" an Image file from a subdomain

the image is located on the root domain

         

Gian04

12:29 pm on Aug 2, 2009 (gmt 0)

10+ Year Member



Normally if you will display an image you will just do it this way

/images/imagename.jpg where the imagename.jpg was uploaded on my images folder

How will I display an image if it is located on my root domain and the page that will display it is on a subdomain

Do I really need to do it this way [http://subdomain.domain.com/images/imagename.jpg] ?

Gian04

1:58 pm on Aug 2, 2009 (gmt 0)

10+ Year Member



I mean is there a way to do that NOT in absolute linking? Or do I really need to do it in absolute linking. Is there any disadvantage if I use an absolute compared with relative?

wyweb

2:06 pm on Aug 2, 2009 (gmt 0)



Why not just copy the image to your subdomain?

Gian04

2:14 pm on Aug 2, 2009 (gmt 0)

10+ Year Member



Because If I have 10 subdomains, I would also have 10 copies of my logo.gif file (and a lot of other image file). Thats a waste of disk space.

swa66

7:52 pm on Aug 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're worried about diskspace you could enable followsymlinks and symlink the files on the server, or even make hard links if they all are on the same filesystem. [Assuming a unix like OS + Apache]

You also could put all your images on http://images.example.com/ that's how quite a few of the big ones do it.

[edited by: tedster at 8:02 pm (utc) on Aug. 2, 2009]
[edit reason] de-link the example url [/edit]