Answers.Body: <p><a href="https://craftcms.com/classreference/models/AssetFileModel" rel="nofollow">AssetFileModel</a>'s <a href="https://craftcms.com/classreference/models/AssetFileModel#getPath-detail" rel="nofollow">getPath</a> should do what you're looking for.</p>
  
  <pre><code>&lt;img ix-path="{{ asset.getPath() }}" alt="Test Image"&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T19:24:56.483Z
Answers.Text: For some reason that isn't including the folder in the path, just the filename
Answers.UserDisplayName: Dan Christian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T19:43:15.603Z
Answers.Text: If it's just the filename, then that means the file is in the root of your Asset source path.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T19:45:35.650Z
Answers.Text: Yes, your answer is correct, there is something wrong with the asset folder I think.
Answers.UserDisplayName: Dan Christian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T00:10:08.700Z
Answers.LastActivityDate: 2016-07-27T00:10:08.700Z
Answers.UserDisplayName: Brad Bell
Body: <p>I am using a 3rd party service to run the image processing so I do not need full URL's for the images. I just need it to spit out the relative path name of the asset, not the absolute URL. I seem to be able to get either the <code>asset.folder</code> or the <code>asset.filename</code> but not both.</p>
  
  <pre><code>{% if entry.homepageImage|length %}
  {% set asset = entry.homepageImage.first() %}
    &lt;img ix-path="{{ asset.filename }}" alt="Test Image"&gt;
  {% endif %}
  </code></pre>
  
  <p>I did try including the folder when setting the asset but that didn't work either, plus seems quite convoluted for something relatively simple.</p>
  
  <pre><code>{% set asset = entry.homepageImage.folderId(2).first() %}
  </code></pre>
  
Tags: <assets>
Title: Get asset folder and filename together
ThreadText: # Get asset folder and filename together
  
  (Asked by: username_0 on 2016-07-26)
  
  I am using a 3rd party service to run the image processing so I do not need full URL's for the images. I just need it to spit out the relative path name of the asset, not the absolute URL. I seem to be able to get either the `asset.folder` or the `asset.filename` but not both.
  
  ```
  {% if entry.homepageImage|length %}
  {% set asset = entry.homepageImage.first() %}
    <img ix-path="{{ asset.filename }}" alt="Test Image">
  {% endif %}
  
  ```
  
  I did try including the folder when setting the asset but that didn't work either, plus seems quite convoluted for something relatively simple.
  
  ```
  {% set asset = entry.homepageImage.folderId(2).first() %}
  
  ```
  
  **Tags:** assets
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-27. Score: 1 | Accepted answer
  
  [AssetFileModel](https://craftcms.com/classreference/models/AssetFileModel)'s [getPath](https://craftcms.com/classreference/models/AssetFileModel#getPath-detail) should do what you're looking for.
  
  ```
  <img ix-path="{{ asset.getPath() }}" alt="Test Image">
  
  ```
  
  > **Comments:**
  > **username_0**: For some reason that isn't including the folder in the path, just the filename  
  > **username_1**: If it's just the filename, then that means the file is in the root of your Asset source path.  
  > **username_0**: Yes, your answer is correct, there is something wrong with the asset folder I think.  
  
  ---
  
  