find existing photo before saving