Feature #2828: add SAVED_TO_IMAGE_ID attribute to template