Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By SB on
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
Uploaded images in D7 - path to file.
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
I am developing the website
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
image url
In drupal 7 how can able to change that url path..
This module solves that very
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
Based on Drupal 7, Views
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
Hi Tim.Could you explain how
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.
There is no multiple field settings
e.g. you can't output just the first image for a given node
Works great. Thanks!
This worked for me. I was able to use this method to get the URL and use it in my Field re-write.
@timofey, AFAIK there's no
@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 beimage 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
It would still work if the
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)"