adds photos and join table for libraries