Use the type stored in the photo table for the attachment