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 maheshg85 on
I have a fid of an image field from file_managed table . Using file_usage table I can get the Node ID with which fid is associated. My requirement is how I can get the image field info of that Node with which my fid is associated since Node got many image fields? Any drupal core function which may help me to get field information based on fid.
Thanks is advance.
Comments
Are you looking for
Are you looking for file_load()?
Its Not file_load
file_load gives me a file object and only file related info like size,mime etc and not the field related information. What I doing is, listing the all the images from file_managed table in a HTML table format . I also need to show in my listing to which node does image belongs to and with which image field it associated . Using file_usage I can get the node. but how I can get the field through which Image has been uploaded. I have fid and node id with me.
Have you got any solution for this
Hi Mahesh,
have got any solution for this, please let me know what you did for this?