Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have a view that displays nodes in fields format.

I have a Global text field in which I want to display the URL of images contained in nodes; however, I can't find how to get the URL of the images.

What I've tried:

  • I added the Image field and chose "Content" as the option for "Link to." This is the link I want, but this prints out the image too (I don't need the image) and I can't use this field as a replacement pattern.
  • I added a link to the content itself, but then this gives me a link to a node, not the image.

In Views, how do I get a link directly to an image file (not the node containing the image file)?

share|improve this question
    
What you want to try to achieve? real senarioo ? –  Rupesh Apr 30 at 1:55
    
I need to output the image link because I want to add it as the query string to a Google reverse image search lookup. –  Patrick Kenny Apr 30 at 1:56

2 Answers 2

up vote 3 down vote accepted

An option that doesn't require installing a new module:

  • Create a Relationship to the image for which you want to create a link
  • Add a field File:Path
  • Exclude from display
  • Rewrite Results - output this field as a link
  • Add the replacement pattern to your global text
share|improve this answer
    
In my case, I also needed to check Display download path instead of file storage URI under the File:Path options in Views, because Google requires a download URL; it won't accept a Drupal path. –  Patrick Kenny Apr 30 at 16:34

You have to use Image URL Formatter module.

This module provide a image formatter as Image URL.

Select That formater in views .

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.