Add base64 api call and fix resize issue.