added route and controller for avatar

as a fix for issue #5420 I have added the suggested controller and route.