EZP-20502: reverted changes to image id handling