title: How to load image and make it as background in p5.js
body: <p>I just want to ask a simple question, how do I load an image and make it as a background in my html5 canvas</p>
  
  <pre class="lang-js prettyprint-override"><code>var bg;
  
  function setup() {
    createCanvas(600,400)
    bg = loadImage("https://mcdn.wallpapersafari.com/medium/1/92/T1iecJ.jpg")
  }
  
  function draw() {
    background(bg)
  }
  </code></pre>
  
  <p>i tried that method but the screen only showing whitescreen, i've search for it but i can't get the solution.</p>