title: Uncaught Error: Cannot find module './imgShop/X React
body: <p>i have a issue with setting the src of an Card.Img element, this element is being generated via a .map() which maps the props of an object from an array, let me show you:</p>
  <pre><code>const items = [
  {name:&quot;Banana&quot;,price:4,img : './imgShop/pexels-any-lane-5945848.jpg',id:1},
  {name:&quot;Apple&quot;,price:2,img : './imgShop/pexels-bruno-scramgnon-575610.jpg',id:2},
  {name:&quot;Orange&quot;,price:4,img : './imgShop/pexels-dominika-roseclay-2090902.jpg',id:3},
  {name:&quot;Lemon&quot;,price:3,img : './imgShop/pexels-lukas-1414110.jpg',id:4},
  {name:&quot;Pumpkin&quot;,price:10,img : './imgShop/pexels-miguel-á-padriñán-673073.jpg',id:5},
  {name:&quot;Kiwi&quot;,price:5,img : './imgShop/pexels-pixabay-51312.jpg',id:6},
  {name:&quot;Green apple&quot;,price:3,img : './imgShop/pexels-pixabay-533343.jpg',id:7},
  {name:&quot;Cherry&quot;,price:1,img : './imgShop/pexels-lisa-109274.jpg',id:8},
  {name:&quot;Guacamole&quot;,price:7,img : './imgShop/pexels-dominika-roseclay-2095924.jpg',id:9},
  {name:&quot;Melon&quot;,price:12,img : './imgShop/pexels-brian-van-den-heuvel-1313267.jpg',id:10},
  {name:&quot;Pomegranate&quot;,price:9,img : './imgShop/pexels-karolina-grabowska-4226732.jpg',id:11},
  {name:&quot;Pear&quot;,price:2,img : './imgShop/pexels-mali-maeder-568471.jpg',id:12},]
  </code></pre>
  <p>And</p>
  <pre><code>const Shop = () =&gt; {
  let firstArray = items.slice(0,4)
  let secondArray = items.slice(4,8)
  let thirdArray = items.slice(8)
  
  return(
      &lt;div id=&quot;shop-container&quot; className=&quot;container d-flex&quot;&gt;
          &lt;div className=&quot;col&quot;&gt;
          {firstArray.map(item =&gt; {
             return(
              &lt;Card style={{ width: '18rem' }} key={item.id}&gt;
          &lt;Card.Img variant=&quot;top&quot; src={require(item.img)} /&gt;
          &lt;Card.Body&gt;
              &lt;Card.Title&gt;{item.name}&lt;/Card.Title&gt;
              &lt;Card.Text&gt;
              Some quick example text to build on the card title and make up the bulk of
              the card's content.
              &lt;/Card.Text&gt;
          &lt;/Card.Body&gt;
          &lt;/Card&gt;
             )
         
         })}
                 
             
          &lt;/div&gt;
          &lt;div className=&quot;col&quot;&gt;
         
          &lt;/div&gt;
          &lt;div className=&quot;col&quot;&gt;
              
          &lt;/div&gt;
      &lt;/div&gt;
  )
  </code></pre>
  <p>}</p>
  <p>I already try putting only the path of one image and works, but when i put <strong>item.img</strong> throws me that error, and i have to use the <strong>require</strong> function because if not webpack doesn't process the img</p>