hook_node_insert and FileField Paths I'm using hook_node_insert to process some data from node.

This code returns image URL, BUT i'm using FileField Paths and i can't manage to get the final image URL. Is there any way to solve this issue?

$fid = $node-&gt;field_imagen['und'][0]['fid'];
$imgpath = file_load($fid)-&gt;uri;
$url = file_create_url($imgpath);


Thanks
Filefield Path uses hook_entity_insert() to operate with file directory. The hook_node_insert is called before hook_entity_insert, so the file isn't processed yet there.
See: https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_save/7

module_invoke_all('node_' . $op, $node);
module_invoke_all('entity_' . $op, $node, 'node');


You should use that hook as well. Just make sure, your module have higher weight than ffp. (Check (and increase if necessary) the weight field of your module in the system table.)