refactor to put both passport and resize options in config