Fix image uploading, resizing, overwriting existing templates on phone