Set max dimensions of photo and swap name and photo position