Png Image React. The following will be the names of the image inside the img folder. Also if you have my icon ios png and my icon android png the bundler will pick the correct file for the platform.
The image name is resolved the same way js modules are resolved. Large collections of hd transparent react logo png images for free download. The app will load only the image necessary for particular screen density.
If you save the file and load the application you will see that the image is not displayed but broken icon is displayed for the button with alt text.
So to fix this we need to include the image. In react components we can import images just like javascript modules where webpack includes that image file in a bundle and returns the final path of an image. If you don t want to import image then there is also provision to add image in src url using require function. So to fix this we need to include the image.