Why img tag doesn't load any images with WebPack5 and React?

I have spent some hours to understand how to load images in src attribute or as inline style with background-image (url) but in my case all variants which I’ve found – don’t work. It’s really strange but I have started 50 times my local server and 3 times images were present and it makes me… Read More Why img tag doesn't load any images with WebPack5 and React?

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 )