'Using public folder in react for images

I seem to struggle with an issue for a long while, and I didn't find a satisfying answer yet.

I'm currently building a react app for an artist. The most part of the app is a gallery with many sections and hundreds of images.

Right now all the images are in a folder inside 'src', because I build the galleries based on imports of the images in separate files.

My question is - is it essential (or best practice) to include all the images of the website inside the public folder? It is not very clear for me if the public folder should be used for most cases, or actually avoided in most cases.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source