WP-2652 Added code to save the image id.