Fix URI generation in image metadata reader #1647