Set return value of get_image_id() correctly