Creating a token for the image field file path with node reference nid
The answer is using the Fieldfield Paths module.


  The FileField Paths module extends the default functionality of Drupals core Upload module, the FileField module and many other File Upload modules by adding the ability to use node tokens in destination paths and filenames.