Add the appropriate “Tag” based on what Expo library you have a question on.
This guide for Expo + Next does not work when loading local images. Image loading on the web always results in:
Error: Image import “./background-image.png” is not a valid image file. The image may be corrupted or an unsupported format. It looks like an issue in next-images which appears to have been abandoned.
I figured out most of this issue. withImage from next-image just does not work anymore. It uses deprecated file-loader logic. The first step is to remove this dependency completely. With nextjs 13 it is unnecessary because it already supports require for local files.
If you make this change, then you hit an issue with react-native image control not supporting the images loaded in nextjs 13. I did not debug this any further, I just switched to using SolitoImage which uses the default image element for web rendering and it works correctly.