add image authorization on upload_avatar
Merge pull request #1523 from dbarbera/avatar_formats_fix

add image authorization on upload_avatar