For a skill with images, images are showing up when testing in amazon developers console. But when i test this same skill in echo show. It just shows up the title, No image is displayed.
The code for my display function is as :
function initiateImage(imageSrc){ const title = 'Game'; const image = new Alexa.ImageHelper() .withDescription('alexa') .addImageInstance(imageSrc) .getImage(); const template = { type: 'BodyTemplate1', backButton: 'HIDDEN', title, backgroundImage: image, }; return template }
And inside my handler is as:
const LaunchRequestHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === `LaunchRequest`; }, handle(handlerInput) { const imageSrc1 = 'https://ballypics.s3.amazonaws.com/page-3-ballicopter~ipad.png'; var temp=initiateImage(imageSrc1); return handlerInput.responseBuild .addRenderTemplateDirective(temp) .speak(welcomeaudio) .reprompt(helpMessage) .getResponse(); }, };
Please help with this. Do I need to make any changes in the code or image specifications? I have hosted my images in S3 with public access and already changed the policy for CORS. Thanks