<p>Found out the answer on how to get all my sites on Craft 3 to share one image folder. So you have to set your base url for all your site to your original site's base url.</p>

<p><a href="https://i.sstatic.net/7L08x.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7L08x.png" alt="Set Base Url for all sites to the same url."></a>
Then in your code, you just put {{ siteUrl }} before your image url. Kind of confusing since siteUrl is actually the Base Url in the dashboard.
<a href="https://i.sstatic.net/IxYx9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IxYx9.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-09-15T21:13:12.750Z
2017-09-15T21:13:12.750Z
Holly Do
<p>Environment variables as a concept don't exist anymore in Craft 3.  You can read about it along with the recommend replacements in the Craft 2 => 3 <a href="https://github.com/craftcms/docs/blob/master/en/upgrade.md#environment-variables" rel="nofollow noreferrer">upgrade guide</a>.</p>

CC BY-SA 3.0
2017-09-14T21:13:51.117Z
So I set up my siteUrl using an array but I'm not sure what 'siteHandle1' in the upgrade guide means. Could you please clarify that? I tried doing 'siteUrl' => ['web' => 'http://craft3.dev/',  'web-dore' => 'http://dore.dev/', 'web-exp' => 'http://exp.dev/', ],
Holly Do
CC BY-SA 3.0
2017-09-14T21:35:48.267Z
The site handle will be whatever the `handle` field is set to in the Control Panel under Settings->Sites.
Brad Bell
CC BY-SA 3.0
2017-09-14T21:47:36.230Z
Ok, thank you. I've changed the handle as you have specified, but it is still not parsing the {siteUrl}.
Holly Do
CC BY-SA 3.0
2017-09-15T00:48:08.067Z
You probably need to do something like `{siteUrl['web']}`, `{siteUrl['web-dore']}`, `{siteUrl['web-exp']}`, etc
Ryan
CC BY-SA 3.0
2017-09-15T18:27:54.387Z
@Ryan There is only one input field for the Base Url and I tried putting what you've suggested, but the siteUrl is still not parsing.
Holly Do
CC BY-SA 3.0
2017-09-14T20:15:58.543Z
2017-09-14T20:15:58.543Z
Brad Bell
<p>Currently, I have 3 sites set up in Craft 3 beta. I'm trying to get all my sites to share one asset folder by using absolute path. However, I can't seem to set it up. The siteUrl is not parsing as I would expect. I would get "{siteUrl}/assets/people/image.png".</p>

<p><a href="https://i.sstatic.net/S3B4f.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/S3B4f.png" alt="Setup on Craft3&#39;s asset dashboard"></a>
<a href="https://i.sstatic.net/NgPSb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NgPSb.png" alt="Inside general.php"></a></p>

<assets><craft3><multi-site>
Setting absolute path to asset files for Craft 3 multisite
# Setting absolute path to asset files for Craft 3 multisite

(Asked by: username_0 on 2017-09-14)

Currently, I have 3 sites set up in Craft 3 beta. I'm trying to get all my sites to share one asset folder by using absolute path. However, I can't seem to set it up. The siteUrl is not parsing as I would expect. I would get "{siteUrl}/assets/people/image.png".

[![Setup on Craft3's asset dashboard](https://i.sstatic.net/S3B4f.png)](https://i.sstatic.net/S3B4f.png)
[![Inside general.php](https://i.sstatic.net/NgPSb.png)](https://i.sstatic.net/NgPSb.png)

**Tags:** assets, craft3, multi-site


---

## 2 answers

### Answer by username_0 on 2017-09-15. Score: 2

Found out the answer on how to get all my sites on Craft 3 to share one image folder. So you have to set your base url for all your site to your original site's base url.

[![Set Base Url for all sites to the same url.](https://i.sstatic.net/7L08x.png)](https://i.sstatic.net/7L08x.png)
Then in your code, you just put {{ siteUrl }} before your image url. Kind of confusing since siteUrl is actually the Base Url in the dashboard.
[![enter image description here](https://i.sstatic.net/IxYx9.png)](https://i.sstatic.net/IxYx9.png)


---

### Answer by username_1 on 2017-09-14. Score: 1

Environment variables as a concept don't exist anymore in Craft 3. You can read about it along with the recommend replacements in the Craft 2 => 3 [upgrade guide](https://github.com/craftcms/docs/blob/master/en/upgrade.md#environment-variables).

> **Comments:**
> **username_0**: So I set up my siteUrl using an array but I'm not sure what 'siteHandle1' in the upgrade guide means. Could you please clarify that? I tried doing 'siteUrl' => ['web' => 'http://craft3.dev/',  'web-dore' => 'http://dore.dev/', 'web-exp' => 'http://exp.dev/', ],  
> **username_1**: The site handle will be whatever the `handle` field is set to in the Control Panel under Settings->Sites.  
> **username_0**: Ok, thank you. I've changed the handle as you have specified, but it is still not parsing the {siteUrl}.  
> **username_2**: You probably need to do something like `{siteUrl['web']}`, `{siteUrl['web-dore']}`, `{siteUrl['web-exp']}`, etc  
> **username_0**: @username_2 There is only one input field for the Base Url and I tried putting what you've suggested, but the siteUrl is still not parsing.  

---

