问题原文
原帖链接 · user1409508 · CC BY-SA 3.0
I need some advice from more experienced webmasters.
I have 2 websites (site A and site B). These websites are totally different, but they use same product images (around 1 GB of images). These websites are on same hosting server.
For now, site A has own folder with images and site B has own.
I'm wondering if there is a way to have two different websites with only 1 folder with images, so I could save some time and disk space on server.
I read a bit about CDN (Content Delivery Network) but I'm not sure if it may help me. I'm using API to grab product images, so I need a way to upload images on remote server automatically. Maybe there is another way to achieve this?
社区高分解答
原帖链接 · John Conde · CC BY-SA 3.0
This is easier than you think. You can host the images on one of the two websites and simply use the full URL of the images to load them.
For example, if you host the images on website A, you would load the images on website B using:
http://websitea.com/images/image1.jpg
No CDN or any special configuration required. Just basic HTTP.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
