refactor avatar url to reduce size of definitions