I followed a reply to a similar question on the Amazon developer support forums from Mark Stringer:
I have been struggling with this myself and now have it working. If
you are using the sample AlexaSkill.js module that Amazon provide then
you need to add a couple of sections to it to deal with picture cards.
In the buildSpeechletResponse section add this after the similar type
"Simple" section:
if (options.cardSmallImageURL && options.cardLargeImageURL) {
alexaResponse.card = {
type: "Standard",
title: options.cardTitle,
text: options.cardContent,
image: {
smallImageUrl: options.cardSmallImageURL,
largeImageUrl: options.cardLargeImageURL
}
};
}
Then after the askWithCard definition further down add this:
askWithPictureCard: function(speechOutput, repromptSpeech, cardTitle, cardContent, smallImageURL, largeImageURL) {
this._context.succeed(buildSpeechletResponse({
session: this._session,
output: speechOutput,
reprompt: repromptSpeech,
cardTitle: cardTitle,
cardContent: cardContent,
cardSmallImageURL: smallImageURL,
cardLargeImageURL: largeImageURL,
shouldEndSession: false
}));
Now you can call it, probably using variables rather than constants I
was testing with using;
response.askWithPictureCard('This is the speech output', 'This is the
reprompt', 'this is the card title', 'This is the card text, note the
field is called text not cardContent',
'https://s3.amazonaws.com/thisisthesmallpictureurl-small.jpg',
'https://s3.amazonaws.com/thisisthebigpictureurl-big.jpg' );
Then follow a similar process to add a tellWithPictureCard function.
There's one small typo in the code there where Stringer put crd when he meant card which I corrected in my paste above. Other than that this approach worked for me.