How can I get the size of the avatar uploaded and inform the user if the file is too big? Indeed, it seems like the edition does not proceed for a certain size of the avatar file.
When uploading a file too big for the Avatar restrictions, the error page displayed should already display a message such as
The form you submitted contained the following errors
The maximum allowed size for images is 50 kilobytes
If you're looking to fetch and display the maximum dimensions for avatars dynamically and before someone attempts to upload a too large avatar file, you'll need to dig this information up from EE's exp_sites table. The data is serialized and base64 encoded, so you'll need PHP to retrieve the data.