Active
Project:
Computed Field
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2013 at 23:09 UTC
Updated:
10 Jun 2013 at 19:14 UTC
Dear All:
How to get image field url in the computed field ? I tried many method but all not work
like:
$image = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_image)));
$path = file_create_url($image->uri);
$entity_field[0]['value'] = $path;
also tried node_load
entity_metadata_wrapper
whatever method does not work
Please help!
thanks
Comments
Comment #1
gokhangulgezen commentedHi
$path = file_create_url($entity->field_your_image[und][0][uri]);
$entity_field[0]['value'] = $path;
probably this will solve your problem. You just need to replace "field_your_image" with your image field machine name.
bye