Answers.Body: <p>You can't append anything to the value if you use environment variables. You need to use <a href="https://craftcms.com/docs/3.x/config/#aliases" rel="nofollow noreferrer">aliases</a> for this.</p>
  <p>In you <em>config/general.php</em>, add this:</p>
  <pre class="lang-php prettyprint-override"><code>'*' =&gt; [
      'aliases' =&gt; [
          'assetBasePath' =&gt; getenv('ASSET_BASE_PATH'),
          'assetBaseUrl' =&gt; getenv('ASSET_BASE_URL'),
      ],
  ],
  
  </code></pre>
  <p>Then in the asset volume settings, use the aliases in the <strong>Base URL</strong> &amp; <strong>File system path</strong>:</p>
  <p><a href="https://i.sstatic.net/2h0dd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2h0dd.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-21T12:12:12.827Z
Answers.Text: Thx, updated as suggested but it still creates a folder at web root titled /public_html/@assetPath/sub_folders_etc
Answers.UserDisplayName: stuartmcd69
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-21T08:37:45.040Z
Answers.LastActivityDate: 2020-09-22T09:33:19.797Z
Answers.LastEditDate: 2020-09-22T09:33:19.797Z
Answers.UserDisplayName: nstCactus
Answers.Body: <p>For my future self, the aliases mention by nstCactus are required to reside within the <code>'*'</code> global setting area of general.php</p>
  <pre><code>'*' =&gt; [
      'defaultWeekStartDay' =&gt; 1,
      'cpTrigger' =&gt; 'admin',
      …
      'aliases' =&gt; [
      …
      …
      ]
  ]
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-21T13:54:13.620Z
Answers.LastActivityDate: 2020-09-21T13:54:13.620Z
Answers.UserDisplayName: stuartmcd69
Body: <p>OK,
  So created 2 variables in my local .env file</p>
  <p><code>ASSET_BASE_URL=&quot;https://mysite.local/resources&quot;</code></p>
  <p><code>ASSET_BASE_PATH=&quot;/Volumes/yada/yada/yada/resources&quot;</code></p>
  <p>Then in the CP, created a new Asset volume and punched in</p>
  <p><code>Base URL = $ASSET_BASE_URL/gallery</code></p>
  <p><code>File System Path = $ASSET_BASE_PATH/gallery</code></p>
  <p>Then front end renders an entries asset as:</p>
  <p><code>&lt;img src=&quot;$ASSET_BASE_URL/_480x480_crop_center-center_80_none/doddle-01.jpg&quot; alt=&quot;Doddle 01&quot; width=&quot;480&quot; height=&quot;480&quot;&gt;</code></p>
  <p>THEN it creates a new folder named '$ASSET_BASE_PATH' at public site root.</p>
  <p>I'm familiar with V2 it appears V3 has stepped up a bit. Could it be a Mamp issue with paths or somesuch trickery? Works if I hard code the paths as listed initially. All help greatly appreciated.</p>
  
Tags: <assets><multi-environment><volumes>
Title: Enironment Variable being rendered literal
ThreadText: # Enironment Variable being rendered literal
  
  (Asked by: username_0 on 2020-09-21)
  
  OK,
  So created 2 variables in my local .env file
  
  `ASSET_BASE_URL="https://mysite.local/resources"`
  
  `ASSET_BASE_PATH="/Volumes/yada/yada/yada/resources"`
  
  Then in the CP, created a new Asset volume and punched in
  
  `Base URL = $ASSET_BASE_URL/gallery`
  
  `File System Path = $ASSET_BASE_PATH/gallery`
  
  Then front end renders an entries asset as:
  
  `<img src="$ASSET_BASE_URL/_480x480_crop_center-center_80_none/doddle-01.jpg" alt="Doddle 01" width="480" height="480">`
  
  THEN it creates a new folder named '$ASSET\_BASE\_PATH' at public site root.
  
  I'm familiar with V2 it appears V3 has stepped up a bit. Could it be a Mamp issue with paths or somesuch trickery? Works if I hard code the paths as listed initially. All help greatly appreciated.
  
  **Tags:** assets, multi-environment, volumes
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-09-21. Score: 3 | Accepted answer
  
  You can't append anything to the value if you use environment variables. You need to use [aliases](https://craftcms.com/docs/3.x/config/#aliases) for this.
  
  In you *config/general.php*, add this:
  
  ```php
  '*' => [
      'aliases' => [
          'assetBasePath' => getenv('ASSET_BASE_PATH'),
          'assetBaseUrl' => getenv('ASSET_BASE_URL'),
      ],
  ],
  
  ```
  
  Then in the asset volume settings, use the aliases in the **Base URL** & **File system path**:
  
  [![enter image description here](https://i.sstatic.net/2h0dd.png)](https://i.sstatic.net/2h0dd.png)
  
  > **Comments:**
  > **username_0**: Thx, updated as suggested but it still creates a folder at web root titled /public_html/@assetPath/sub_folders_etc  
  
  ---
  
  ### Answer by username_0 on 2020-09-21. Score: 2
  
  For my future self, the aliases mention by username_1 are required to reside within the `'*'` global setting area of general.php
  
  ```
  '*' => [
      'defaultWeekStartDay' => 1,
      'cpTrigger' => 'admin',
      …
      'aliases' => [
      …
      …
      ]
  ]
  
  ```
  
  
  ---
  
  