I'm sorry, but could you just return the id `+  out.Write(sf.FormatStatus(img.ID, ""))`

Thanks