publish: refactoring to contain mapillary into the iamge mode

generated from commit 7c8ac99e15be5a275fd2422c69d4a8cebb2c28b4