79260118

Date: 2024-12-07 07:07:45
Score: 0.5
Natty:
Report link

Create an assets folder inside the public folder to move all your images into. Then, you can access the images directly without using require() like this:

<img
  src={`/assets/${tagEl.value}.png`}
  alt="tag"
  style={{ width: "3rem" }}
  className="suggestion-img-img"
/>

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ayantunji Timilehin