Where should I put images files in React project?

Adding images in the public folder and the src folder both are acceptable methods, however, importing images into your component has the benefit that your assets will be handled by the build system, and will receive hashes which improves caching/performance. You’ll also have the added benefit that it will throw an error if the file is moved/renamed/deleted.

I should note that I believe the hashing functionality is out of the box with create-react-app but needs to be manually configured in Webpack otherwise.

Leave a Comment

casinojojobetpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişcasinoholiganbet girişholiganbet güncel giriş