At Core, React Native support 2 types of images:
Local Images: Image needs to be embedded with app at runtime using node’s
require([asset_path])
and not work for a dynamic path.Networks Images. Those are images hosted to remote server and you reference them by Universal Resource Identifier (URI) and most time is valid
HTTP
orHTTPS
resource link.
You’re trying to pass URI as a remote image which is an invalid (…/assets/images/subfolder/filename.ext) URI.
There are 2 ways you can solve this problem and both work well for Mobile and Web.
Convert images to base64 and save encoded image string in database (Brute-force solution)
Upload images to cloud providers like Amazon AWS or Firebase Storage and save respective public links in the database.
CLICK HERE to find out more related problems solutions.