clicked photos to layout persist to db