Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Anand04
Posts: 95
Registered: ‎06-05-2012
My Device: Developer
My Carrier: Developer
Accepted Solution

Load Image from assest in WebView

Hi All,

 

is that possible to load image from assest in webview using html tags?

 

Thanks,

Please use plain text.
Developer
mdodd
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Re: Load Image from assest in WebView

It's possible to set web pages using the local:/// protocol, so I shouldn't see why not. I've not tried it out before, mind.

 

From the documentation

 

WebView {
    id: webView
    url: "local:///assets/webview/javascriptmessage/test.html"
}

 

 I know that deals with QML and not HTML, but you should be able to create a tag like: 

<img src="local:///assets/webview/myImage.png" alt="My Image" />

 



Did this post help you? If so, please make sure to "like" it!
Please use plain text.
Developer
Anand04
Posts: 95
Registered: ‎06-05-2012
My Device: Developer
My Carrier: Developer

Re: Load Image from assest in WebView

 

Thanks its solved my problem.

 

 

Please use plain text.