For the code in the thread you linked to, I’m not really sure how it would work. Maybe I missed something but I thought relative paths didn’t work with create-react-app/webpack. It would work if you added the Assets folder with the images inside the public folder but I didn’t see that mentioned in the thread.
I believe you can also do this. But I’m not sure if it’s a good idea.
I think at first glance it’s because the images aren’t in public. If you’re using Create React App @Lacika1981 then does your directory structure look a bit like this (very simplified, but in your project you have a source folder with all the code in, and Assets is a folder in there):
Cos this ain’t gonna work if that’s the case. Assets needs to a folder to be in the public folder – in my post I just used that file path as an example, in reality any static assets need to sit in public because they aren’t code, they need to be available to the app when the code is compiled