Automatically resize uploads for avatars

If you want to ensure all avatar mages uploaded are resized to a specific file size (width and height), then add this code to an mu-plugin file or your functions.php file: