Retrieve file path with get_attached_file() if an attachment ID is present. #2236