I'm inside mytheme_image_formatter($variables) function and I got the image's FID (from $fid = $variables['item']['fid']).
Question: Is there a way to know which object is using the image file?
Using file_usage_list(file_load($fid)), I can see which objects may use the file. But I want to know which one is using the image file, inside my function.
Tried to use mytheme_preprocess_image(&$variables), but I also found the same situation.
This is the same problem as discussed here, without a solution.