I've to create a custom function to display images because I've to add values from custom fields.
I've added a function to template php, like this:
function mytheme_image($variables) {
}
The problem is that in $variables I haven't the fid of the file, but only the path. I have to load the file to get values from field, how should I do?
I'm looking for functions to get fid from path but I haven't found something..