In React, the program is run via index.html and is located in src public, so camera.jpg is moved to public. Then call './camera.jpg'. It works.