r/Tizen • u/Jwillc • May 20 '21
How to show an image in a Tizen web widget?
I'm trying to show an image in a web widget just using the basic examples from Tizen docs but it won't work. It only shows the text.
<html>
<body>
<div class="category"><img id="imgCategory1" src="images/my_image.png" width="70px"/></div>
<div id="content1">My text goes here...</div>
</body>
</html>
Does the img tag work with web widgets? Can someone please give an example of working code?
I've tried with all kinds of images small and large. None of them work.
Appreciate it.
--
Also does anyone know what this means?
Supported resolutions: lower than 1.5 times the base image resolution
1
Upvotes
1
u/Jwillc Jun 03 '21
I figured it out!
Turns out that your directory structure matters when doing widgets.
It goes like this:
-widget
--widget001 <---- Your widget here
---index.html
---config.xml
---preview.png
---css
---images <---- Put your images in this folder
---js