create and rewrite photos