How to add inline src to image ( Webpack 5 )

I tried to add a string representation of [src] to an image, but it doesn’t work. import React from "react"; import cn from "classnames"; import "./index.scss"; export const PanelItem = (props) => { return ( <li className={cn("panel-item", props.className)}> <a href={props.linkData.url}> <img src="./image.png" alt={props.iconData.alt} /> <span>{props.linkData.text}</span> </a> </li> ); }; Using import statement works well always.… Read More How to add inline src to image ( Webpack 5 )