How to add image asset when creating a plugin

I am creating a figma plugin and I cannot add an svg image to the ui.html, please help

How do you add SVG to HTML?

  <img src="search.svg" alt="" width="120">

Please note that the SVG and ui.html are in the same directory

Therefore, just embed the SVG code in the HTML.

This worked, thanks for the help

I have another problem though,

I used figma.ui.postMessage('msg') in my code.ts file to send a message to the ui, then I listen to the message in ui.html using onmessage = (event) => { console.log("got this from the plugin code", } but I do not get any response in my ui.html

I’m not sure why this happened, because the code is correct.
So you don’t see the line got this from the plugin code msg in the console?

After I debugged for a while, I found out onmessage = (event) => { console.log("got this from the plugin code", } should come immediately after opening the ui.html <script> tag.
I think my issues have been resolved successfully.

Thanks for you help