custom image format and size for avatars

Allow user to specify custom image format and size for avatars.