Get the "href" attribute of an image I created a new content type in Drupal 7, and added an image field named "field_photo." Can anyone tell me how I can extract the "href" attribute of that photo? Is there a short code I can use?
When you access the field on your node you will get the file id. This can be passed to file_load which will return the file object. One of the properties is filepath which holds the path to the actual file. I'm guessing that's what you are after - images doesn't use href &lt;a&gt; tags do.