# Having a hard time changing background image

**URL:** <https://phaser.discourse.group/t/having-a-hard-time-changing-background-image/914>\
**Category:** Phaser 3\
**Created:** [January 24, 2019, 11:21am UTC](https://phaser.discourse.group/t/having-a-hard-time-changing-background-image/914 "2019-01-24T11:21:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![philip9](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@philip9](https://phaser.discourse.group/u/philip9)\
**Post date:** [January 24, 2019, 11:21am UTC](https://phaser.discourse.group/t/having-a-hard-time-changing-background-image/914/1 "2019-01-24T11:21:59Z")

</div>

Hi people, I started learning Phaser couple a days ago, I have rendered my game but I can’t set my background to the desired photo, the console doesn’t give me any errors and I can’t figure out what I am doing wrong? Here is my code:

var config = {  
type: Phaser.AUTO,  
width: 600,  
height: 800,  
physics: {  
default: ‘arcade’,  
arcade: {  
gravity: {y: 500},  
debug: false  
},  
scene: {  
preload: preload,  
create: create  
}  
},  
};

var game = new Phaser.Game(config);

function preload() {  
this.load.image(‘background’, ‘./assets/star-background.jpg’);  
}

function create() {  
this.add.image(400, 300, ‘background’);  
}

function update() {

}

---

<div class="post-metadata">

**Author:** ![hcakar](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/hcakar/32/459_2.png) [@hcakar](https://phaser.discourse.group/u/hcakar)\
**Post date:** [January 24, 2019, 11:24am UTC](https://phaser.discourse.group/t/having-a-hard-time-changing-background-image/914/2 "2019-01-24T11:24:42Z")

</div>

Hello @philip9,

please see the examples here: [https://labs.phaser.io/edit.html?src=src/game%20objects/images/single%20image.js](https://labs.phaser.io/edit.html?src=src/game%20objects/images/single%20image.js)

This one is a single image with rotation but you can find lots of them in [labs.phaser.io](https://labs.phaser.io)

Please try to copy this:

```
var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    physics: {
        default: 'arcade',
        arcade: {
            gravity: {y: 500},
            debug: false
        },
    },
    scene: {
        preload: preload,
        create: create
    },
};

var game = new Phaser.Game(config);

function preload() {
    this.load.image('background', './assets/star-background.jpg');
}

function create() {
    this.add.image(400, 300, 'background');
}

function update() {

}

```

Only difference that you are using different kind of quetos use double or single quetos instead and it should work 🙂

---

<div class="post-metadata">

**Author:** ![philip9](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@philip9](https://phaser.discourse.group/u/philip9)\
**Post date:** [January 24, 2019, 12:23pm UTC](https://phaser.discourse.group/t/having-a-hard-time-changing-background-image/914/3 "2019-01-24T12:23:10Z")

</div>

Wow, so the problem was that my quotes were a different ASCI character? No wonder that was driving me nuts after checking so much examples, thanks!
