publish should create a subfolder named with the ID
After publishing to a folder "x/y/z" there is no immediate way to find the ID - except by viewing the image, which is not possible when working on the command line.
Furthermore, the publish path needs to be adjusted for each call to publish, and overwriting would actually overwrite similar files, while adding a subfolder with the generated ID would avoid both issues.