<p><code>{{ image.FeaturedImage[0].path }}</code> may be what you are looking for, this will give you the folder and the filename of an asset.</p>

CC BY-SA 4.0
2021-01-03T18:45:56.480Z
2021-01-03T18:45:56.480Z
dmatthams
<p>I'm looking to output the relative URL of my assets instead of the full URL with domain for my Imgix config. As imgix puts it in their docs:</p>
<pre><code>http://www.yourcompany.imgix.com/images/examples/pic.jpg
</code></pre>
<p>Currently, my assets are rendering like so:</p>
<pre><code>http://www.yourcompany.imgix.com/http://www.localmachine/images/examples/pic.jpg
</code></pre>
<p>Looking at this as my code:</p>
<pre><code>https://domain.imgix.net/{{ image.FeaturedImage[0].url }}
</code></pre>
<p>Is there a way to just output a relative URL instead of absolute? (I've looked at plugins for imgix, but seems a bit overkill if it just needs a relative URL?)</p>

<templating>
Relative Asset URL
# Relative Asset URL

(Asked by: username_0 on 2021-01-03)

I'm looking to output the relative URL of my assets instead of the full URL with domain for my Imgix config. As imgix puts it in their docs:
http://www.yourcompany.imgix.com/images/examples/pic.jpg

Currently, my assets are rendering like so:
http://www.yourcompany.imgix.com/http://www.localmachine/images/examples/pic.jpg

Looking at this as my code:
https://domain.imgix.net/{{ image.FeaturedImage[0].url }}

Is there a way to just output a relative URL instead of absolute? (I've looked at plugins for imgix, but seems a bit overkill if it just needs a relative URL?)

**Tags:** templating


---

## 1 answers

### Answer by username_1 on 2021-01-03. Score: 2 | Accepted answer

`{{ image.FeaturedImage[0].path }}` may be what you are looking for, this will give you the folder and the filename of an asset.


---

