trim the base64 strings