Get the image URL in a view

December 27, 2014

If you have an image in your content type then using an image in a view is a snap. However, just getting the image URL, for example, to use it in a field rewrite, is not obvious. You can easily get the URL by creating a relationship to File and then adding the file path to the view. Here are the steps:

Add a file relationship

In the View, under Advanced add a relationship to File Usage:File

Add a file path to the view

In the View, under Fields add a field File: Path

Configure the field to show the download path.

And that is all there is to it.