Answers.Body: <p>Turns out you need to have the URL prefix set under the Asset Settings in order to call .getUrl()
  <a href="https://i.sstatic.net/bchmZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bchmZ.png" alt="enter image description here"></a></p>
  
  <p>Once I added this, my transforms began working.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-22T19:16:18.550Z
Answers.Text: Be sure to configure the protocol correctly as well. https:// http:// or //
Answers.UserDisplayName: joshwa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-22T18:18:42.723Z
Answers.LastActivityDate: 2017-05-22T18:18:42.723Z
Answers.UserDisplayName: joshwa
Body: <p>I can load the s3 image fine using the s3 base path and the craft cms filename that is saved in the craft cms database:</p>
  
  <p><code>&lt;img src="{{cdnUrl}}/filepath/{{entry.Image.first().filename }}" /&gt;</code><br>
  renders<br>
  <code>&lt;img src="cdn.imageurl.com/filepath/filename.jpg" /&gt;</code>  </p>
  
  <p>However if I want to access the same image without the s3 base path (e.g. in order to use an image transform), I get a null. </p>
  
  <p><code>&lt;img src="{{entry.Image.first().getUrl('transform')}}" /&gt;</code><br>
  renders<br>
  <code>&lt;img src="" /&gt;</code>  </p>
  
  <p>Any help would be appreciated!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-20T16:10:24.467Z
Comments.Text: Does it work if you call `getUrl()` without the transform argument?
Comments.UserDisplayName: Stephen Lewis
Tags: <assets><image-transforms><s3>
Title: asset.first().getUrl('transform') not working for s3 asset - Craft CMS 2.6.2980
ThreadText: # asset.first().getUrl('transform') not working for s3 asset - Craft CMS 2.6.2980
  
  (Asked by: username_0 on 2017-05-19)
  
  I can load the s3 image fine using the s3 base path and the craft cms filename that is saved in the craft cms database:
  
  `<img src="{{cdnUrl}}/filepath/{{entry.Image.first().filename }}" />`  
  renders  
  `<img src="cdn.imageurl.com/filepath/filename.jpg" />`
  
  However if I want to access the same image without the s3 base path (e.g. in order to use an image transform), I get a null.
  
  `<img src="{{entry.Image.first().getUrl('transform')}}" />`  
  renders  
  `<img src="" />`
  
  Any help would be appreciated!
  
  **Tags:** assets, image-transforms, s3
  
  > **Comments:**
  > **username_1**: Does it work if you call `getUrl()` without the transform argument?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-05-22. Score: 1 | Accepted answer
  
  Turns out you need to have the URL prefix set under the Asset Settings in order to call .getUrl()
  [![enter image description here](https://i.sstatic.net/bchmZ.png)](https://i.sstatic.net/bchmZ.png)
  
  Once I added this, my transforms began working.
  
  > **Comments:**
  > **username_0**: Be sure to configure the protocol correctly as well. https:// http:// or //  
  
  ---
  
  