avatar api added, support mimetypes