Upload the avatar to an AM using FileReader.readAsDataURL() and the encoded data can work inline in HTML.
Then use an Alias with a URI like "nxtavatar:AM_TRANS_ID_HERE".
Quoting myself... hah... Here's a better flow...
1. Nominate an account to act as the "avatar account". It's purpose is to receive AM and maybe define an alias to the account number.
2. Send an AM with the FileReader.readAsDataURL encoded image to the avatar account.
3. To find an avatar for an account look for the most recent transaction from the account to the avatar account.
4. Take encoded image and set to value of <img src="AM_DATA_HERE">. More on
data urls5. Rejoice.
* Avatars can be updated by sending a new AM to the avatar account.
nxt: 4915862015826193000