question

sydni avatar image
sydni asked

Image Not Showing Up

I want to have a background image for the launch of my echo show skill. For some reason the image is not showing up but I am getting no errors.

My code:

var response = 
            {
                "version" : "1.0",
                "response" : 
                {
                    "directives" : 
                    [
                        {
                            "type" : "Display.RenderTemplate",
                            "template" : 
                            {
                                "type": "BodyTemplate1",
                                "token": "HMS",
                                "backButton": "HIDDEN",
                                "title": "Home Made Simple",
                                "textContent": 
                                {
                                    "primaryText" :
                                    {
                                        "type" : "RichText",
                                        "text" : "<font size = '6'>" + "Welcome to Home Made Simple,<br/>here for all your home care needs. " + "</font>"
                                    }
                                }
                            }
                        }
                    ],
                    "outputSpeech" : 
                    {
                        "type" : "SSML",
                        "ssml" : "<speak>" + speechOutput + "</speak>"
                    },
                    "backgroundImage": 
                    {
                        "contentDescription": "string",
                        "sources": 
                        [
                            {
                                "url": "https://s3.amazonaws.com/hmsimages/hmslogosmall",
                                "size": "X_SMALL",
                                "widthPixels": 1024,
                                "heightPixels": 600
                            }
                        ]
                    },
                    "reprompt" : 
                    {
                        "outputSpeech" :
                        {
                            "type" : "SSML",
                            "ssml" : "<speak>" + "If you need help on what to say, say 'help me'. " + "</speak>"
                        }
                    },
                    "shouldEndSession" : false,
                },
                "sessionAttributes" : {}
            };
            this.context.succeed(response);
alexa skills kitskillechoresponseecho show
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

asaldanha avatar image
asaldanha answered

When I paste your image url in my Chrome I get the following msg: Access Denied.

You must configure your S3 bucket permission - CORS configuration with the following:

<?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">; <CORSRule> <AllowedOrigin>http://ask-ifr-download.s3.amazonaws.com</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> </CORSRule> </CORSConfiguration>

Also your images MUST be made PUBLIC.

10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.