title: Adding a gif to a p5.js "artwork"
body: <p>I have tried to add a gif in p5.js to my "artwork" (basically a picture with moving elements).</p>
  
  <p>However I encounter the error "Uncaught TypeError: gifimage.position is not a function" even though I think I am doing as instructed in different guides.</p>
  
  <p>I tried this: <a href="https://editor.p5js.org/kjhollen/sketches/S1bVzeF8Z" rel="nofollow noreferrer">https://editor.p5js.org/kjhollen/sketches/S1bVzeF8Z</a></p>
  
  <p>Below is the code (the ......... represent the parts which do not affect the error).</p>
  
  <pre><code>var gifimage;
  
  function preload() {
      .........
      gifimage = createImage("gifimage.gif");
  }
  
  function setup() {
      createCanvas(1920, 1080);
  }
  
  function draw() {
      .........
      if (keyIsPressed === true) {
          gifimage.position(500, 800);
      }
  }
  </code></pre>