I have a node for a photo. I want to know what is the best why to define the file path for the images. The images will be user submitted.
Ideally, I would have liked the path be sites/default/files/photo/[node-reference:NID] so that each node would have all the image nodes associated with it in their own folder. This would make it easier to migrate the images since not only in the database but also in the file system would describe which images belong to which. Because the referenced node isn't available for the Tokens module I need to come up with a different strategy.
I have considered things like user sites/default/files/photo to dump all the images into one folder which might become a mess over time or sites/default/files/photo/[user id] so that each user's images are in separate containers. I don't know what the benefit of that would be.
I'm also thinking about creating a name convention for each image to that it has the node reference NID and user name in code. Is it worth the effort?
I'm looking at the image scr attributes on websites like grammy.com and examiner.com to see how they set it up. It looks like the examiner.com uses a hash to name the image.
Does anybody have any ideas on how to do this?