update upload avatar to support different image file types