Issue
I have an expo app where I am fetching list of product and displaying it, the image works on development and even when I run .apk build it shows the image. But once I run the .aab build and push to playstore when I download the app the images fetched from the server do not show. I have been on this for the longest time, not quite sure what to look out for. Other items like product name, price and co shows correctly except the image.
Below is the code for rendering the image:
<Image source={{ uri: item?.product_image?.imageUrl, }} style={styles.image} />
image: {
width: "100%",
height: 200,
borderRadius: 10
},
When I use image on the local device, it shows but when I switch to getting from the server it does not work, even when I hardcoded the image uri, it still did not work. This is the image url to show the image exists: https://res.cloudinary.com/dkpeentvl/image/upload/v1691842935/Image/ut1kgltvufhnscg2ijnc.jpg
Solution
The image url sent from the server was this http://res.cloudinary.com/dkpeentvl/image/upload/v1691842935/Image/ut1kgltvufhnscg2ijnc.jpg INSTEAD of this https://res.cloudinary.com/dkpeentvl/image/upload/v1691842935/Image/ut1kgltvufhnscg2ijnc.jpg
When I added "s" to the http, it started working.
Answered By - greatkene
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.