Environment
https://play.nativescript.org/?template=play-ng&id=GYAGpS&v=379
Describe the bug
Local images work fine but when change to placeholder.com images(https://via.placeholder.com/150.jpg) or any other online image URLs, it throws an error.
Works with this URL
but not with the following or any other. How will I be able to set images from my server?
Expected behavior
Sample project
https://play.nativescript.org/?template=play-ng&id=GYAGpS&v=379
Additional context
Tried in multiple phones too and the emulator
Device Logs:
JS: Error in downloadBitmap - java.io.FileNotFoundException: https://via.placeholder.com/150.jpg
hey its working fine but your link is not a valid image link its a webpage link

other images are working fine

Any image that you will open in the browser will look likes this:


Additionally adding response headers too for comparing:


For png/jpg concerns :

But I don't see any difference between those links. I don't understand what you are pointing at?
Sir i meant that your link is not valid image
try this
_in your use_
that means its not a proper bit image
You must give a proper file(image) link.
image can be extension of _.png .jpg_ etc or maybe _without extension_ but link must be of an image not other file
You must give a proper file(image) link.
image can be extension of _.png .jpg_ etc or maybe _without extension_ but link must be of an image not other file
Checked the link on various sites (if it is a valid image link or not).
https://exifinfo.org/detail/x_SzPFOjuAM0wkcPhzyBGQ
It is still not convincing. This irregularity gives me little to no confidence that it can work properly all the time. _1 link like that and the app goes weird._
Can you provide any code or something to track if that link is valid or not? This will be more helpful because all the sites or codes I try to check if the above link is a valid image link or not, I am not getting the result that you are too convinced to say.
Sir i meant that your link is not valid image
try this
- https://nativescript.org/assets/ns-logo_share_600x315.png (working fine)
- but if i remove .png from link will give error because its a proper image not a page that shows image (https://nativescript.org/assets/ns-logo_share_600x315)
_in your use_
- https://via.placeholder.com/150 (showing in web browser)
- same result when changing extension (https://via.placeholder.com/150.nukrt) (https://via.placeholder.com/150.jpg) etc
that means its not a proper bit image
Well, we can configure to serve images irrespective of the extension as we do with .php or .html files.
there are many websites that actually do this too.
https://www.printvenue.com/static/polo-tshirt-banner-2019
Not a good point to go by.
As I said, it will be better if any code can check the validity of the link which can give the result that you are stating, will be helpful as I tried but getting just the opposite of what you are stating.
i never said extension is required, the proper valid image link is required
here its a image without extension https://www.printvenue.com/static/polo-tshirt-banner-2019
try adding extension will cause not found https://www.printvenue.com/static/polo-tshirt-banner-2019.png
but in your link add anything, its return a page, in case if it is a file then you can only able to access through that specific file url
i never said extension is required, the proper valid image link is required
here its a image without extension https://www.printvenue.com/static/polo-tshirt-banner-2019
try adding extension will cause not found https://www.printvenue.com/static/polo-tshirt-banner-2019.pngbut in your link add anything, its return a page, in case if it is a file then you can only able to access through that specific file url
Like I said earlier, we can configure our server to return image irrespectiveof the extension. Calling it an invalid image link is not right as you are getting served by an image all the time.
So unless you can provide some code that can tell that the specified link is not serving a valid image, this point can be nothing more than spam. As this is not serving any valid or logical point as the served item is an image.
but in your link add anything, its return a page, in case if it is a file then you can only able to access through that specific file URL
If you open an image on browser.. you will see it as page lol :/ Check the content-type.. it is an image, not a page lol
It would be better to provide some code otherwise all are just baseless points. And we can't move forward without that.
i never said extension is required, the proper valid image link is required
here its a image without extension https://www.printvenue.com/static/polo-tshirt-banner-2019
try adding extension will cause not found https://www.printvenue.com/static/polo-tshirt-banner-2019.pngbut in your link add anything, its return a page, in case if it is a file then you can only able to access through that specific file url
Any workable code for testing as discussed above? I can not move forward without that.
See a live wallpaper app using nativescript
https://play.google.com/store/apps/details?id=org.iamabs.lyrica
See a live wallpaper app using nativescript
https://play.google.com/store/apps/details?id=org.iamabs.lyrica
not helping with my above-described problem. Can you provide any code to justify your hypothesis?