title: Set image as object in ReactJS
body: <p>I'm trying to set an image as object in ReactJS but i don't know the syntax , i looked on google but i didn't find anything! I don't know if it's even possible ? </p>
  
  <p>Here's the code:</p>
  
  <pre><code>const items = [
    {
      src: '../images/hb1.jpg',
      altText: 'slide 1',
      caption: 'dfjkdfjksdfjk',
      header:'something'
    },
    {
      src: '../images/hb1.jpg',
      altText: 'slide 1',
      caption: ' asdasdasd',
      header:'something'
  
    },
    {
      src:'../images/hb1.jpg',
      altText: 'Slide 3',
      caption: 'dasjdasdkj',
      header:'something'
  
    }
  ];
  </code></pre>
  
  <p>i call it later on here:</p>
  
  <pre><code>&lt;img src={item.src} alt={item.altText} /&gt;
  </code></pre>
  
  <p>I tried 'url('../url')' but didn't work! </p>