Refactor method definition in UserPhotoGenerator