webview and local images?
Is there some readon my logo.png should not be showing up in a webview? Everything else in the view works, and if I point the img src to a web-based image, it displays fine… but the logo file IS in the images folder (I've tried it in other too…), t DOES show up fine when tested with safari, it also DOES NOT work with different images in other formats (jpg, gif, etc)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Technology Demo</title>
</head>
<body style="text-align: center">
<h1>Welcome to the demo page</h1>
<p><img src=" images/logo.png" alt="logo"></p>
<p>This is the main page of the app, where an explanationan, images and contact info could go…</p>
</body>
</html>
5 Answers
-
Local image refs broke with the switch to 1.1
I've posted a couple messages about this with no solutions.
Emailed Appcelerator and the sales person basically told me I could get this fixed in no time if I just bought Premium support.
So there you are…
-
Does it make any difference if you try to reference your image like this?
<img src="app://images/logo.png" alt="logo">
-
Put it in the main directory and it will work !
-
I've finally gotten img references to work in 1.2
Reference that works for me <img src="app://somefolder/myimage.jpeg" >
in this somefolder is absolutely required it can be 'Resources' but I just added an 'images' folder to put them in.
ie <img src="app://images/myimage.jpeg" >
This <img src="app://myimage.jpeg" > will cause the app to crash when it loads the page.
Haven't tested this on an actual phone yet.
-
I've finally gotten img references to work in 1.2
Reference that works for me <img src="app://somefolder/myimage.jpeg" >
in this somefolder is absolutely required it can be 'Resources' but I just added an 'images' folder to put them in.
ie <img src="app://images/myimage.jpeg" >
This <img src="app://myimage.jpeg" > will cause the app to crash when it loads the page.
Haven't tested this on an actual phone yet.