How to import and use images in Reactjs? I have imported all images from a folder but it does't return array with links. check this.
function importAll(r) {
return r.keys().map(r);
}
const images = importAll(require.context('./', false, /\.(png|jpe?g|svg)$/));
console.log(images);
Check this screenshot of console:

Please help me in this!
Folder structure:
--src>
--components>
Projects.jsx
--img>
images
I am trying to import it in Projects component. but, How to do this?
import React from 'react';
import '../App.css';
function importAll(r) {
return r.keys().map(r);
}
const images = importAll(require.context('./', false, /\.(png|jpe?g|svg)$/));
console.log(images);
Please help in load the all images and use them.