Added image_refs code