I tried to display image using appwrite file url but it is not working <Image source={{ uri: 'http://localhost/v1/storage/buckets/DoctorPhoto/files/6497b4c9040711eaedb9/view?project=64717a2c981b74efdaa2&mode=admin', }} style={{width: 400, height: 400}}></Image>
What do you mean by "it's not working"?
"Not working" means not working in react native Image componenteactImageView: Image source "null" doesn't exist. The image is not displaying using appwrite URL, I tried other URL from other sources. which works fine,
If i past the URL in browser then it perfectly displays the image. but not displying in react native image tag
What do the network and console logs from your browser say?
Btw, in your app, you shouldn't have the mode=admin part
ReactImageView: Image source "null" doesn't exist
And what about the network logs?
And what library exactly are you using to display the image?
React-Native Image component
url based images are also not displayed in Flutter also. I think it is because our image url has no images extension (.jpg, .png etc) that why frame does not permit to display.
To tackle this I used appwrite image preview (storage.getFilePreview()) and used it in image widget
Found the issue with url, the saved url have "localhost", replacing the "localhost" to IP work fine for me.
I have one request to appwrite team please add image extension in image URL.
Thanks @Steven and @Hassanmrwt for support.
I am really impressed with appwrite community <:appwritefire:823999000330895380>
You are always welcome champ
Why?
It should work. Feel free to create a separate post
Recommended threads
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Deep Linking & Password reset
I am using react native with expo. I want to implement deep link with the url recived via email. So when clicked the link it opens my app. I havent ever used de...
- Deploy function not working - 503
Hellon i get this error message, when i try to deploy a new version of a function <html><body><h1>503 Service Unavailable</h1>No server is available to handle...