React native, Unable to resolve module for static image
Have you tried to mount the image, like the new asset manager allows you to do? It's described in the documentation.
Use the following prop for the Image component. Choose the right relative path and dont forget the extension.
<Image source={require('./my-icon.png')} />
Sometimes, your image might include an @2x
or @3x
for different screen dpi as mentioned in docs. In such case the path should specify the image name without the @2x
or @3x
suffix. For example if image file name is [email protected]
:
<Image source={require('./img.png')} />
Restart your react packager. That worked for me.