图像不显示在基本卡中,响应丰富,我提供了图像的url,但它没有显示图像
@囚徒这是我的密码,如果我做错了,请告诉我
app.intent('totalResponses', (conv, { Location }) => {
// extract the num parameter as a local string variable
if (!conv.surface.capabilities.has('actions.capability.SCREEN_OUTPUT')) {
conv.ask('Sorry, try this on a screen device or select the ' +
'phone surface in the simulator.');
return;
}
conv.ask('Hello World');
conv.ask(new BasicCard({
text: `Hello`, // Note the two spaces before '\n' required for
// a line break to be rendered in the card.
title: 'Title: this is a title',
image: new Image({
url: 'https://drive.google.com/file/d/13eEr2rYhSCEDKDwCLab29AqFMsKuOi4P/view',
alt: 'Image alternate text',
}),
}));
});发布于 2018-05-04 15:35:22
问题在于您正在为图像使用的驱动器URL。此URL用于在直接从Google加载图像时预览图像。它是一个HTML页面,而不是一个图像,所以它不会显示,如果你使用它在网页或卡的助手。
要获得您需要使用的URL,您需要选择页面顶部的三个点,然后选择"Embed“。您不想使用整个嵌入代码-只是URL。

发布于 2020-04-06 14:16:49
按照以下步骤获得解决方案:
&id=https://drive.google.com/uc?export=view&id=之后https://stackoverflow.com/questions/50169118
复制相似问题