adding an option to automatically calculate the image hash