In drupal 6 views we had an option to an image type field to display the path to that file. Now I can't find it anymore in Drupal 7. Where is it? :)

Comments

davydog’s picture

Here's where I found the image I uploaded through the image field embedded within a Basic page:
http://www.website.com/sites/default/files/image-name.jpg

Hope this helps.

-dave myers

TLGwegg’s picture

I am developing the website on a local server.
How do I link the path, without having to change the link when moving the files to a live site?

thanks

santhoshsan’s picture

In drupal 7 how can able to change that url path..

g089h515r806’s picture

This module solves that very problem - it's called the Image URL Formatter: http://drupal.org/project/image_url_formatter .

Chinese drupal tutorials Think in Drupal

timofey’s picture

Based on Drupal 7, Views 3

Add a "File Usage: File" relationship (Advanced->Relationsips)
Add a "File: Path" field, NOT "Content: Image" (Block details->Fields)
You will have limitless options on image path output. Click to Display download path instead of URI.

enjoy :P

webdevandy’s picture

Hi Tim.

Could you possibly explain how to handle fields with multiple images?

I have an imagefield through which unlimited images can be uploaded, but I simply want to get the file path of the first one for each row in my view.

In drupal 6, I could simply add my image field, group multiple values, set only the 1st value to show, and set the format as the image path.

In drupal 7... I have no idea.

kpv’s picture

e.g. you can't output just the first image for a given node

loopy1492’s picture

This worked for me. I was able to use this method to get the URL and use it in my Field re-write.

luco’s picture

@timofey, AFAIK there's no control over which image you'll output using File Usage: File. so if your content type has multiple images, they'll be chosen at random, I guess.

therefore you must select Content: My image field:fid. the relationship will be image from field_my_image_field. also, you can't select an image style this way.

so it's better to stick with Image URL Formatter for the time being, at least. ;)

_________________________

"There is no off position on the genius switch."
- David Letterman

shocknawe’s picture

It would still work if the user only inputs into the multiple file field one at a time.
(using this as a current work around)

In the input help, i instructed user to

"You must only upload 1 image at a time. When creating:
1. Upload only 1 image.
2. Save.
3. Edit
4. Upload another image.

(repeate 3 & 4 till all images are uploaded)"