HTML <IMG /> tag source path to assets sub folder (relative URL)

I tweak that case a bit:
I wanted to put image underneath the button as inside the HTML file, but I don`t know the relative path to the asset folder and subfolders.

If I should use PlayCanvas editor TAGs instead of pure HTML solution to show image in that HTML UI then please tell me how to call those tags with hmtl/css/js? Is it a class or attribute or object name?

What if I would like to add to that HTML jQuery or Bootstrap js file there? Is it possible to put relative paths there?

Hi @mdesign,

You can use the asset.getFileUrl() method for the image src attribute.

Here is a forum post that includes example code on how to do that:

1 Like


What that means?

If you can post a reproducible, that will help people investigate further

I have this error often during a previewing scene in your editor (launch button). I can`t post details now but I will do that in future.