1

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)?

  • What you want to try to achieve? real senarioo ? – Rupesh Apr 30 '14 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 '14 at 1:56
3

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
  • 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 '14 at 16:34
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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