Example using img tag with h function with local icons

ui

#1

I’m using the h function in the UI Rename Artboards examples and I can’t seem to show images in the UI in my plugin directory.

Here is what I have so far:

var label;
var row =
	h("div", { class: "row", alignItems:"center", style: { border: "1px solid blue" } },
		label = h("span", { style: { width: leftWidth, border: "1px solid red" } }, "Row:"),
		h("img", { src:"icons/Test Icon.png", width:"10", height:"10", style:{border: "1px solid green", width:"20px", height:"20px"}}), 
		h("span", { style: {  border: "1px solid black"} }, "test" )
	)
	
messageParagraph.appendChild(row);

#2

What’s your plugin structure look like (as in, where does Test Icon.png live?)


#4

False alarm. The icons were saved to my test plugin folder. I moved them and they are now showing up. :slight_smile: